Description
The AccumBooleanGen Generator generates the cumulative sum of the referenced value based on the Boolean reset value.
In This Article
- Generator Parameters
- Example 1 - Numbers Accumulate and Reset a Randomly Generated Boolean True
- Sample Output
Generator Parameters
The following parameters may be configured for the AccumBooleanGen Generator. Items with an asterisk* are required.
- reference* - References the Attribute whose values will be accumulated.
- reset* - References the Boolean value. Whenever the Boolean value changes to true, the output for this Generator will reset to start the accumulation again.
- decimalFormat* - Defines the format for the number in the generated result.
Examples:Value Pattern Output 123456.789 ###,###.### 123,456.789 123456.78 ### 123456 123.78 000000.000 000123.780 9.95 000.### 009.95 0.95 ##0.### 0.95
Example 1 - Numbers Accumulate and Reset a Randomly Generated Boolean True
For this example, the AccumBooleanGen Generator will be linked with two other Generators:
- RandomGen Generator - Generates the random number value to be accumulated when Boolean is false.
- BooleanValueGen Generator - Generates the random Boolean value that determines when accumulation resets (true/false).
Parameters:
- reference - References linked RandomGen Generator
- reset - References linked BooleanValueGen Generator
RandomGen Generator Configuration:
BooleanValueGen Generator Configuration:
Sample Output
As shown below, when the Boolean Value is "true," the accumulation resets, and the initialValue is present as the generatedValue.
When several False values are present, the initialValue will be accumulated until a Boolean "true" is reached.