List.PositionOfAny
Returns the first offset of a value in a list.
Syntax
List.PositionOfAny(
list as list,
values as list,
optional occurrence as Occurrence.Type,
optional equationCriteria as any
) as any
Remarks
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.
Examples
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})
Result:
1
Category
List.Membership functions