Data Transformation Engine Functions and Expressions Reference Guide
Chapter 1 - Expressions and Evaluations Evaluating Expressions
Functions and Expressions Reference Guide
26
Object Names Influence the Number of Evaluation Sets
In some expressions, the same data object name may appear more than once.
The same data object name always refers to the same data object. The same data
object name influences the combinations of evaluation sets that are selected. For
example:
BackOrder(s) = Qty Ordered:Record:Order - Qty
Received:Record:Order
When a BackOrder evaluation set is selected, the Record that contains Qty
Ordered is always the same Record that contains Qty Received. And an Order
is always the same one for one evaluation set. When the same object name is
used more than once in the same expression, both references bind to the same
object.
If there is always one Qty Ordered per Record and one Qty Received per
Record, the following would be sample data:
Record # Qty Ordered Qty Received
1 5 4
2 4 4
3 6 2
This would produce three Back Orders, one for each Record.
You can coordinate nested data objects easily by the way an object name is used.
Using Object Names to Coordinate Evaluation Sets
In the following example, common object names are used to coordinate Qty and
UnitPrice so they do not get mixed up across different Records:
Extension = SUM ( Qty:Detail Record:Order * UnitPrice:Detail
Record:Order )
This rule has only one evaluation set because the SUM consumes all the objects
referenced in the rule.