Exists
- Last Updated: October 26, 2026
- 2 minute read
- Corticon
- Version 7.1
- Documentation
SYNTAX
<Collection> ->exists(<Expression1>,<Expression2>,…)
<Collection> ->exists(<Expression1> or <Expression2> or …)
Returns a value of true if <Expression> holds true for at least one 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>) are supported within the parentheses (..). However, take care to ensure invariant expressions are not inadvertently created. For example:
<Collection> -> exists(integer1=5, integer1=8)
will always evaluate to false because no integer1 value can be both 5 AND 8 simultaneously.
USAGE RESTRICTIONS
The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.
This sample Rulesheet uses ->exists 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. Input and Output panels are shown below.
![]()