The finddata() function returns the numeric position of a data item in a list field that is associated with a specified numeric value. If no data item is associated with the specified value, 0 is returned.


finddata(window_field, value)


window_field – A list field displayed in the window.

value – A long integer previously associated with an item in the list field using the add item statement.

Return value



The add item statement allows you to add items to a list field and associate numeric values with those items. While these values aren’t displayed in the list field, the finddata() function will return the position in the list of a specified value and its related item. For example, if an item added was the fifth item in a given list, and its associated value was 1234, specifying that list field name and 1234 as the parameters in a finddata() function will return the number 5.

Values can be associated only with items that are added to a list field using the add item statement. You can’t associate numeric values with the static values assigned to a list field’s data type. If the same numeric value is associated with two or more static values, the position of the first matching value will be returned.

Documentation Feedback