Collection extensions

find

collectionstandard futureprog, computer function, computer program

Syntax

@CollectionVariable.find(ItemVariableName, InnerFunction)
Returns
Number (index)
Available in
standard futureprog, computer function, computer program
The FIND function accepts an inner function (which must return a boolean) and returns the index position of the first item in the collection that is TRUE for the inner function. If it finds no matches, it will return -1. For example if you had a CHARACTER COLLECTION, .Find(x, @x.Age > 50) would return the index (position in collection starting at zero) of the first character over the age of 50.