Math Functions with Node Set Constraints

The following math functions calculate values from sets of nodes:
  • Average
  • Count
  • Maximum
  • Minimum
  • Sum

For example, the Sum function calculates the total value of all ItemPrice nodes when ItemPrice is a recurring source node.

You can use several node sets as parameters with these functions, including single nodes. You can also use literal numbers or the results of other math functions as parameters for functions that accept node sets.

Limitations in Combining Other Math Functions or Literals

When using numbers or other functions to supply node set parameters, some math functions use the first occurrence of a node set in calculations. In a mapping rule, if you link functions that work with only one node of the set as a parameter to another function that works with the full node set, the final result will not include values from the full node set.

For example, the Multiply function is linked with the Sum function in a mapping rule and so during run time, the result of the Multiply function becomes the input to the Sum function.  If the input to the Multiply function is a recurring item structure, the Multiply function multiples the UnitPrice with the Quantity and then passes the result to the Sum function. The result from Sum function would be the product of the first UnitPrice and Quantity – not the total extended price for all items.

Note: The Count function accepts any source node as a parameter, including structure or choice nodes which you usually cannot map.



Feedback | Notices


Timestamp icon Last updated: Wednesday, February 17, 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/ref_Math_Functions_with_Node_Set_Constraints.html