skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Associate element(s)

Try Corticon Now

Associate element(s)


<Collection1> += <Collection2>
<Collection1> += <Entity>


Associates all elements of <Collection2> or a single element named <Entity> with <Collection1>, provided such an association is allowed by the Vocabulary. Every <Collection> must be expressed as a unique alias.
If the cardinality of the association between the parent entity of <Collection> and the <Entity> being added is one-to-one (a straight line icon beside the association in the Rule Vocabulary), then this associate element syntax is not used. Instead, replace element syntax is used, since the collection can contain only one element, and any element present will be replaced by the new element.


The Operators row of the table in Vocabulary usage restrictions does not apply. Special exceptions: associate element may only be used in Action Rows (section 5 in Sections of Rulesheet that correlate with usage restrictions).


The following Rulesheet uses associate element to associate an element of collection2 to collection1 when boolean1 value of any element in collection2 is true. Note that the Action is not associating all elements in collection2 with collection1, only those elements within collection2 that satisfy the condition.


A sample Ruletest provides two examples of Entity2 with boolean1 values, and a single Entity1. Input and Output panels are described below: