The itemdata() function returns the numeric value associated with an item occupying a specified position in a list field: a list box, multi-select list box, combo box, drop-down list, button drop list or visual switch.


itemdata(window_field, position)


window_field – A list field displayed in the window.

position – An integer indicating the numeric position of the item in the list field. The first position in the list has the integer value 1, and so on.

Return value

Long integer


Numeric values can be associated only with items added to a list field using the add item statement. If the item associated with the position specified was defined as a static item in the Data Type Definition window, or if no data was specified when the item was added using the add item statement, 0 will be returned.

Documentation Feedback