bottom

Sum of children values

Attention: open in a new window. PDF 

User Rating: / 2
PoorBest 

This generation rule produces the sum of the values provided by its children.

It is possible to control the number of value to sum from by each children for each new record.Using -1 means that the rule will sum all the value of provided by each child (that is until it is found exhausted).

For example, consider that there's 3 children providing the following values:

  • Child 1 : 1, 2, 3, 4, ..., 10
  • Child 2 : 1, 2, 3, 4, ..., 10
  • Child 3 : 10, 20, 30, 40, ... , 100

Then using a count of 1 will produce :

  1. 12 = 1 + 1 + 10
  2. 24 = 2 + 2 + 20
  3. 36 = 3 + 3 + 30
  4. ...

But using a count -1 will produce

  1.  660 = 1 + ... + 10 + 1 ... + 10 + 10 + ... + 100

Take care that using a count of -1 may end up in an infinit loop if one of the child doesn't ends.

Add comment


Security code
Refresh