Add an element to the item list.


   code STRING,
   text STRING )
  1. code is the unique key that identifies the item.
  2. text is the text to be displayed in the drop down list.


The addItem() method adds an item to the end of the drop down list of the COMBOBOX.

The first parameter is the value that can be set in the form field. The second parameter is the label to be displayed in the drop down list. If the second parameter is NULL,the runtime system automatically uses the first parameter as the display value.

Uniqueness is not checked by the runtime system. Make sure that the items created are unique, regarding the value key and the display label.

Trailing spaces are not recommended when populating the first parameter because values get truncated when field validation occurs, and the resulting value (without trailing spaces) will no longer match the COMBOBOX item name. Additionally, trailing spaces in the second parameter may cause the COMBOBOX to be much wider than expected. To avoid such problems, use VARCHAR or STRING variables, or use the CLIPPED operator with CHAR variables.