How code tables are processed

When data is retrieved into a DataWindow object column with a code table, processing begins at the top of the data value column. If the data matches a data value, the corresponding display value displays. If there is no match, the actual value displays.

Consider the example in Table 21-9.

Table 21-9: Data values and display values

Display values

Data values

Massachusetts

MA

Massachusetts

ma

ma

MA

Mass

MA

Rhode Island

RI

RI

RI

If the data is MA or ma, the corresponding display value (Massachusetts) displays. If the data is Ma, there is no match, so Ma displays.

NoteCase sensitivity Code table processing is case sensitive.

If the code table is in a DropDownListBox edit style, and if the column has a code table that contains duplicate display values, each value displays only once. So if this code table (Table 21-9) is defined for a column in a DataWindow object that has a DropDownListBox edit style, Massachusetts and Rhode Island display in the ListBox portion of the DropDownListBox.

For information about how a user selection is matched to a data value when a display value corresponds to multiple data values, see “Validating user input”.