For Each Rule

  • Updated

A For Each Rule allows you to execute one or more child rules against each member of a collection. If desired, a filter may be used to select which members are affected.

mceclip0.png

Name

Specifies the name of the rule.

Collection

The collection to which this rule applies.

While looping through the collection, child rules may not modify the collection (add member, remove member, sort, clear, or copy into). For more information, see Looping Through a Collection.

Filter expression

If specified, an expression which will limit which collection members will have the rules applied.

Iterator variable

A variable which will be the collection member for the duration of each iteration. Child rules may refer to this collection member and its fields.

You may declare a new variable or use an existing one. If you declare a variable, it will only be available to the child rules. If you use an existing field or variable, after the iterations are complete, this variable will contain the last member iterated.

Note: If the For Each action is used in an auto sequential rule set, it uses an existing entity field as the Iterator variable, and any child rule references a member field off the variable, it will cause the Rule Set to re-fire infinitely until either the Execution Timeout or Cycle Count limiters halt rule execution. This will not occur if an existing Declare Variable action is referenced, the For Each action declares its own variable, or if the For Each action is used in an auto single-pass sequential rule set.

 

Child rules

The rule(s) to be applied for each iteration through the collection.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.