List.MatchesAny

Last updated 3 months ago

List.MatchesAny

Returns true if the condition function is satisfied by any value.

function (list as list, condition as function) as logical

Description

Returns true if the condition function, condition, is satisfied by any of values in the list list, otherwise returns false.

Category

List.Selection

Examples

Find if any of the values in the list {9, 10, 11} are greater than 10.

List.MatchesAny({9, 10, 11},each _ > 10)

true

Find if any of the values in the list {1, 2, 3} are greater than 10.

List.MatchesAny({1, 2, 3},each _ > 10)

false