SOME¶
Description¶
With SOME, you evaluate if any value in the list is true.
Simple Examples¶
This evaluates to true, since one of the values in the list is true.
Example with properties¶
In this example, we go over all the people in the current case and retrieve their value 'is_onboarded'. If any of these values are true, the whole expression is true. Thus, this evaluates to true if anybody in the case has already been onboarded.
How to check of other things than true¶
To check if there is anything else in the list, just first use a map to change the elements in the list to what you want to check for:
This checks if any element in the list is "high".
Empty lists¶
SOME([]) evaluates to false. When there are no elements to check, the condition "some element satisfies the property" is vacuously false: there is nothing there that could make it true. Put differently, false is the identity for logical OR: starting from false and folding with OR over zero elements leaves the result at false.
This means a check like SOME(get_properties(instances(Person), 'is_onboarded')) returns false when there are no Person instances in the case.