Equinox Online Help - Language Reference - A to Z

Home

ListFind

Applies to
SyntaxListFind (ListItem [, StringExpression])
Action[Function] Finds a specified entry in a combo field.
ScopeOnly usable in form methods.
Notes

This function is used to find the item StringExpression in the combo field or workarea specified by the ListItem parameter and return its position. If StringExpression cannot be found, the function returns 0. If StringExpression is omitted the function returns the position in the list of the item currently selected. ie If the list contains four items "One", "Two", "Three" "Four" and "Three" is selected 'Listfind (field)' will return 3.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryCombo lists
See Also ListAppend, ListCount, ListDelete, ListDeleteString, ListEmpty, ListInsert, ListRead, ListReset, ListSpace
Example

This example inserts an item in a list if it does not already exist.

if ListFind(County, "Essex") = 0 then
ListAppend County, "Essex"
end if