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

listFind Argument Reference

list string
Required

value string
Required

delimiters string
Default: ,

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

includeEmptyValues string
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