Previous Next

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:
Applies to:
 
Syntax 
ADD-LIKE-COLUMN ( field-name-exp | buffer-field-handle 
  [ , pos [ , widget-type ] ] )
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 database name.
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-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:
 
ColHdl = BrwsHndl:ADD-LIKE-COLUMN("Customer.CustNum").

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.