When you create a list item you must associate a data value with each element in the list. When an end user selects an element, the value of the list item changes to the value associated with that element. Similarly, when a value is fetched from the database or assigned to the list programmatically, the list element whose value matches the fetched or assigned value becomes the selected element in the list.
A list item can also store a fetched or assigned value that is not one of the values associated with a specific element in the list. When you define a list item, you must specify how you want it to handle such other values. You can do so in one of two ways:
You can assign a Null value (either programmatically or via a query) to any list item, whether it be combo-box, poplist, or Tlist. This is true even if the list item is mandatory, does not allow other values, and does not contain an explicitly specified null-valued element.
Any list item can display a null, even if the list item contains no explicitly specified null-valued element and does not allow other values. When a Null value is fetched or assigned to a list item, the Null element (blank) is the currently selected element in the list. The runtime appearance of a Null list item depends on the display style:
In Enter Query mode, end users can set the value of a list item to Null when they do not want the list item value to be included in the query criteria:
Keep in mind also that the value of an item is Null when the block does not yet have any records. Oracle Forms creates a record when navigation to the block occurs.
Thus, even if you have defined an initial value for the list item by setting the Default property, that value does not get assigned until the Create Record event occurs for the block. You can force navigation to occur programmatically with Built-ins such as GO_BLOCK and GO_ITEM.
Setting the Required property for a poplist or TList may affect the values the list will display: When selected, an instance of a poplist will display an extra null value if its current value is Null or if its effective Required property is false. When selecting the current value of an instance of a TList, it will be unselected (leaving the TList with no selected value) if its effective Required property is false. But if its effective Required property is true, selecting a TList instance’s current value will have no effect. The value will stay selected.
About list item initial values
Manipulating list items at runtime
About defining check boxes, radio groups, and list items for querying