ADD-LIKE-COLUMN( ) method
Creates a browse column from the specified field and returns its handle. This method can be used only after the browse’s query attribute has been set.
Return type: HANDLE
Applies to: BROWSE widget
field-name-exp
buffer-field-handle
pos
widget-type
An optional character expression specifying the widget type of the column. Valid values are “COMBO-BOX”, “DROP-DOWN”, “DROP-DOWN-LIST”, “FILL-IN”, and “TOGGLE-BOX”. The default value is “FILL-IN”.Thewidget-type
parameter is ignored in character mode.A widget type of “COMBO-BOX” or “DROP-DOWN-LIST” is valid only when the buffer-field’s data type is CHARACTER, DATE, DECIMAL, INTEGER, INT64 or LOGICAL. A widget type of “DROP-DOWN” is valid only when the buffer-field’s data type is CHARACTER. A widget type of “TOGGLE-BOX” is valid only when the buffer-field’s data type is LOGICAL. If the widget type is not valid for the buffer-field’s data type, the AVM generates a run-time error.If not specified, the AVM creates the browse column based on the widget type specified in the buffer-field’s VIEW-AS attribute. (The VIEW-AS attribute has no effect in character mode.)The ADD-LIKE-COLUMN( ) method can be used on a static browse as well as a dynamic browse. When used on a static browse, the browse will become a NO-ASSIGN browse (you must make the database updates).
A dynamic browse column’s validation expression is restricted. It may not contain a CAN-FIND function. To reference the field, the FRAME-VALUE function must be used.
The following is an example of adding the Customer number field to the browse:
OpenEdge Release 10.2B
|