Append While

The "Append While" generation rule is used to create CSV sequences of variying number of values. It relies on two child fields, one providing the values to append in a CSV record and another one to decide weither to stop or continue the same record.


The rule asks the "condition" child to decide if the value provided by the source belongs to the current sequence. If the condition says 'true' then the value is appended to the sequence. Otherwise, it means that the current sequence is over, the value is forgotten and the sequence is provided as-is.


Take a source child providing random values such as "value1" "value2" ... "value6" - use for example a weighted list.


Then build a condition child that checks if the value provided by the source is "value6". If so then the sequence is over, otherwise the value is appended to the sequence being built. 

** This expression stops a sequence if the source reaches
** the "value6" item

With this configuration you will build sequences of varying length with values of the source, each time the source is providing "value6" then the sequence stops.


Add comment

Security code