List.PositionOfAny

Syntax

List.PositionOfAny(list as list, values as list, optional occurrence as nullable number, optional equationCriteria as any) as any

About

Returns the offset in list list of the first occurrence of a value in a list values. Returns -1 if no occurrence is found. An optional occurrence parameter occurrence can be specified.

  • occurrence: The maximum number of occurrences that can be returned.

Example 1

Find the first position in the list {1, 2, 3} at which the value 2 or 3 appears.

List.PositionOfAny({1, 2, 3}, {2, 3})

1