Access the browse columns
- Last Updated: May 9, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
In Create and Use Dynamic Temp-Tables and Browses you will learn how to create a dynamic browse. With a
static browse it is often useful to get at some of its attributes through its handle.
You have already seen how you can use the handle of a browse rather than the
BROWSE browse-name static language construct to
refer to a browse and access its attributes. The individual columns of the browse also
have handles. You can get the handle of any browse column by walking through the list of
browse columns from left to right. This section introduces you to this concept, and in
later examples you use this technique to act on the columns of a browse. These are the
basic attributes you need to identify any column in a browse:
- NUM-COLUMNS — This browse attribute returns the number of columns in the
browse. You can use this as a limit, for example, in a
DOstatement that looks at every column. - CURRENT-COLUMN — This browse attribute returns the handle of the currently selected column in the browse, if the user has clicked on a column.
- FIRST-COLUMN — This browse attribute returns the handle of the first (leftmost) column in the browse. Use this attribute to get started walking through the columns.
- NEXT-COLUMN — This is an attribute of each browse column, not of the browse
itself. After retrieving the handle of the first column using the
FIRST-COLUMNattribute, you then retrieve the column’sNEXT-COLUMNattribute to walk through the columns. - PREV-COLUMN — This column attribute returns the handle of the previous column, that is, the one to the current column’s left in the browse.
Browse columns have various attributes that you can get and, in some cases, set (such as
NAME or LABEL). The ABL Reference
explains all of these attributes. Later examples, such as the one in the “Moving
columns” section, show how to use a few of the attributes.