Understanding Combo Box Controls

You can use a combo box (drop-down list) to display a list of items from which the user can make a selection. The combo box includes a type-ahead feature where typing the first character of a matching item description will select that item in the control. It can reside on a form or inside a grid control or in the grid of a parent child control. When inside a grid control, the combo box acts exactly as a normal grid cell except when it has the focus. At that point, it behaves as a combo box; that is, the user can pick an item from the list by clicking and choosing an item from the drop-down, by typing directly in the field, or by using the arrow and enter keys on the keyboard.

You must associate the combo box with a data dictionary (DD) item. If the associated DD item has user-defined code (UDC) values, those values are used to load the combo box list. During runtime, you can load the control with values from a different UDC, if necessary. Alternatively, you can use event rules (ER) in the application to load the values without reference to a UDC, although doing so precludes the ability to directly include translated text in the drop-down list. In either case, using a system function to remove items, you can dynamically filter the list before it is displayed to the user.

No matter what is loaded into the control, upon initialization, the control always displays -- Select One -- as the currently selected item to indicate that the user should select an item in the control. This is true of combo boxes both on a form and in a grid. Although it is an item in its own right, you cannot remove it from the list. --Select One-- always appears at the top of the list; you cannot insert a list item above it.

Note: -- Select One -- is merely a prompt-an indication to the user to make a selection. --Select One -- is not an actual value. Therefore, it will never be written to the database with the intent of saving it as actual data.