mark for future value(a)
Group |
This function places a marker a on a destination field. Later this marker can be replaced with an actual value with function replace marked value(a,b).
Marking and replacing only works within a record. With the start of a new record, the markings are removed and replaced with an Empty Flag.
It is recommended not to use the function in a function chain, but to place it alone on a field. If the field is used as a sorting field of a node, the sorting takes place after the substitution with the actual value.
Description of Parameters
Parameter |
Description |
a |
Name of the marker. |
Examples
The input file below
H;Sender;Receiver;2011-10-21;20:06:32
P;10000;200;Article 1
P;20000;100;Article 2
P;30000;500;Article 3
will be mapped to the following XML structure (reduced to the part being relevant for this example).
The header should contain - among other things - the total number of positions following it. This information is not available at the moment. One solution could be another node at the beginning of the tree iterating over the positions and increasing a counter. Because the mapping is already doing this at a later point in time when creating the positions in the output tree, the functionality of this function comes into place. NumberPositions uses this function with the marker value MARK_POSCOUNT:
1) mark for future value(a)
a constant: MARK_POSCOUNT
The calculation field increaseCounter increases a variable POSITION_COUNTER by one every time, the node is entered (i.e. a new position is created).
1) calculate and save variable(a,b,c,d,[e])
a constant: POSITION_COUNTER
b constant: +
c constant: 1
d constant:
e constant:
Finally, the calculation field setNumberPositions let all fields being marked with MARK_POSCOUNT be set with the value of the variable POSITION_COUNTER.
1) replace marked value(a,b)
a constant: MARK_POSCOUNT
b variable: POSITION_COUNTER
In an example like this, the difference in runtime between the two approaches is minimal. However, the more positions have to be processed, the larger the difference will be.