Add Item

Use this system function to add an item to the combo box list embedded in a grid that is not displaying a list based on a UDC.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Key

Input, required. The key of the item to add (string or numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Item

Input, required. The name of the item to add (string). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Index

Input, optional. The zero-based index position where the item is to added (integer). If you do not specify this parameter, runtime appends the item to the bottom of the list. The default -- Select One -- prompt always occupies index position zero. If an invalid index is specified, the addition of the new item fails and an error message is logged. Set the parameter to an alphanumeric constant (<Literal>), <Null>, or an applicable object from the object list.

Additional Notes

Use this system function to add an item to the combo box if it is not displaying a list that is based on a UDC (however, the control itself must be based on a valid DD item). Runtime verifies that the Key and Item parameter values are both specified. If either is missing, the addition of the new item fails and an error is logged. If you try to insert an item having a key value that already exists in the list, runtime will not add the item and will log an error.