For all
- Last Updated: October 26, 2026
- 2 minute read
- Corticon.js
- Version 2.4
- Documentation
SYNTAX
<Collection> ->forAll(<Expression1>, <Expression2>, …)
<Collection>->forAll(<Expression1> or <Expression2> or …)
Returns a value of true if every <Expression> holds true for every element of <Collection>. <Collection> must be expressed as a unique alias. Multiple <Expressions> are optional, but at least one is required.
Both AND (indicated by commas between <Expressions>) and OR syntax (indicated by or between <Expressions>) is supported within the parentheses (..). However, take care to ensure invariant expressions are not inadvertently created. For example:
<Collection> -> forAll(integer1=5, integer1=8)
will always evaluate to false because no single integer1 value can be both 5 AND 8 simultaneously, let alone all of them.
USAGE RESTRICTIONS
The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.
This sample Rulesheet uses ->forAll to check for the existence of an element in collection1 whose string1 value equals New, and assigns a value to decimal1 based on the results of the test. Note the use of unique alias collection1 to represent the collection of Entity2 associated with Entity1.
![]()
A sample Ruletest provides 2 separate collections of Entity2 elements and Entity1.decimal1 values. The following illustration shows Input and Output panel
![]()