Function arguments and evaluation
When a function is evaluated, the number of argument objects used for one evaluation depends on the function. In the specification of the syntax for a function, the number of input objects that can be used for each argument for one function evaluation is expressed as "single" or "series".
Some functions use a single object as the value of an argument for one evaluation. For example, the ABS function uses a single object as the value of its argument for one evaluation.
ABS ( Quantity:LineItem )
When a single object is used for one evaluation, the function itself can evaluate many times if there is more than one data object that fits the argument definition. For example, if there were ten Quantity:LineItem data objects, the ABS function could evaluate ten times.
Some functions use an entire series of objects as the value of an argument for one evaluation. For example, the COUNT function uses an entire series of data objects as the value of its argument for one evaluation.
COUNT ( LineItem:PO )
When a series of data objects is used for one evaluation, the function evaluates just once when there is more than one data object that fits the argument definition. For example, if there are ten LineItem:PO data objects, the COUNT function would evaluate only once.
Some functions use an entire series as input and produce a series as output. For example, the evaluation set for the EXTRACT function produces a series from an input series. When a function produces a series, each output can be selected for different evaluation sets of the expression that contains that function.
Consider the following expression:
Line Item(s) = EXTRACT ( Line Item:Order, Qty:Line Item:Order > 1000 )
Each Line Item that fits the specified criteria produces a Line Item of Order. In this example, the map rule is evaluated many times, once for each Line Item produced by the EXTRACT function.
When functions are part of other expressions, the number of evaluation sets for that function depends on the object names used in the entire expression. For example:
Debit ( s ) = ABS ( Debit:Account:Input )
There might be many evaluation sets for the above expression. The ABS function might be evaluated many times, once for each Debit of each Account of Input. However, if the ABS function is part of a more complex expression, common objects of the expression might determine the number of ABS evaluations.