listFind

Determines the index of the first list element in which a specified value occurs. Returns 0 if not found. Case-sensitive

listFind(list, value [, delimiters, includeEmptyValues]) → returns Numeric

Argument Reference for the listFind function

list

Required: Yes

value

Required: Yes

delimiters

Required: No
Default: ,
Values:
  • ,
  • |
  • ;
  • chr(9)
  • chr(10)
  • chr(13)

includeEmptyValues

Required: No
Default: false
Values:
  • true
  • false

Examples sample code invoking the listFind function


Basic Example

Find item in a list and return the index.

listFind("apple,orange,banana", "orange")

Expected Result: 2


Different Delimiters

Find item in a pipe delimited list and return the index.

listFind("apple|orange|banana", "orange", "|")

Expected Result: 2


Fork me on GitHub