You can use the DropDownListBox edit style to have columns display as drop-down lists during execution.
Typically, this edit style is used with code tables, where you can specify display values that users see and shorter data values that are stored in the database.
In the DropDownListBox edit style, the display values of the code table display in the ListBox portion of the DropDownListBox. The data values (not the display values) are the values that are put in the DataWindow buffer when the user selects an item in the ListBox portion of the drop-down list. These values are sent to the database when an Update is issued.
For example, when a user selects the value Business Services in Figure 21-3, the corresponding data value could be a department number such as 200.
Figure 21-3: Example of a drop-down list edit style
To use the DropDownListBox edit style:
Select DropDownListBox from the Style Type box for a DataWindow column.
The Style Type box is on the Edit page of the Properties view for the column.
Select other properties on the Edit page of the Properties view.
Enter values you want to have appear in the Display Value box and corresponding data values in the Data Value box.
You can define and modify a code table for a column in a script by using the SetValue function during execution. To obtain the value of a column during execution, use the GetValue function. To clear the code table of values, use the ClearValues function.
For more about code tables, see “Defining a code table”.