[progress Communities] [progress Openedge Abl] Forum Post: How To Soft-code Default Values...

  • Thread starter Thread starter franchiset
  • Start date Start date
Status
Not open for further replies.
F

franchiset

Guest
Hello, We want to soft-code the default values for certain key fields. For example, a user may be authorized to access only a certain location or locations. If they are in a KUIB app that enables them to add new employee records, we want to default the locationNo to only a specified location, such as the location they are authorized to maintain. Is there a way we can accomplish this so when the user accesses the KUIB New record function, that the initial record values are populated with soft-coded initial values? For example, the Business Entity excerpt below illustrates the general idea. We tried specifying a field for the value on the annotation line, but apparently a constant value is expected. DEFINE VARIABLE defaultLocationNo AS CHARACTER NO-UNDO. assign defaultLocatioNo = assign based on user's role and what locations they are allowed to access. . @openapi.openedge.entity.field.property (field=“locationNo“, name=“default”, value=defaultStoreNo). Alternatively, if we can't default the initial value on the new record, we could add some code at the back-end to change a blank locationNo to the proper locationNo before updating the database. Setting it to the proper value initially (and validating the data at the back-end before updating the data) seems like a preferable approach. Thank you. Regards, Carl

Continue reading...
 
Status
Not open for further replies.
Back
Top