ADD-LIKE-COLUMN( ) method
- Last Updated: January 18, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
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
Syntax
|
- field-name-exp
- The name of a field in one of the buffers associated with the browse's query. If the query is a join, the name must be qualified with the buffer name or the name of the table associated with the buffer.
- buffer-field-handle
- The handle of a buffer-field from a buffer associated with the browse's query.
- pos
- The optional integer value position of the browse column. If pos = 2, the column is the second column. If the position is not specified or the position is invalid, the new column is added at the end of the columns.
- 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".
The
widget-typeparameter 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:
|