The ListGen Generator generates items in a provided list in sequential or random order.
In This Article
The following parameters may be configured for the ListGen Generator. Items with an asterisk* are required.
- waitAmount* - Defines the number of iterations the Generator should wait before moving to the next item in the list.
- random* - Randomizes the list when True. Defaults to False.
- seed - Defines an optional seed for randomization. Using the seed will ensure that the same random data is generated each time data is generated.
- setLoop* - setLoop gives users the ability to OVERRIDE the loop count at the Scenario Level and ONLY produce the number of rows defined in this list.
- iterate - Based on the Boolean value, determines when to generate the next value. If the value is True, it generates the next value. If the value is False, it just waits.
- unique* - When random is set to "True," the unique Parameter determines if the random values must be unique (True) or not unique (False). The default value is "False."
- Note 1: When random and unique = True, the loopCount must not exceed the total number of values in the list, a GenRocket exception will be thrown, and the process halted.
- Note 2: On the GenRocket Web, ListGen will not recognize random = True and unique = True because the number of values may be less than the preview count.
- list - Allows users to enter items into the list that they want to be generated. Add one item on each line in the list.
- resetIndex - Defines whether to restart reading the list from scratch for every generated child row.
The following video can be used to see a quick tutorial on how to use the ListGen Generator:
Important Information when setLoop Parameter is True
When the setLoop Parameter is set to "True" for gen1 Generator of an Attribute in a Domain, the loopCount in the Scenario Domain will appear as shown below with N as the loopCount:
The user will not be able to edit the Loop Count Value.
The Info Icon can be used to view more information.
If the setLoop Parameter is set to "False," then the loopCount can be modified for the Scenario Domain within the Scenario Dashboard.
Step 1: Create an Attribute for a selected Domain
Create an Attribute and assign the ListGen Generator to the Attribute or assign the ListGen Generator to an existing Attribute.
- Click on the Add Attribute button in the left panel of the Domain Dashboard.
- Enter a Name for the Attribute and then click the Save button.
Step 2: Assign the ListGen Generator to the Attribute
A Generator will be intelligently assigned to the Attribute automatically by the data warehouse. The assigned Generator can be replaced by the ListGen Generator within the Attribute Dashboard.
To learn how to assign or reassign the listGen Generator, please see: How do I assign a Generator to a single Attribute?
Step 3: Configure Generator Parameters
All required parameters will be assigned a default value, which may be changed if needed. Descriptions can be found at the top of this article.
The list Parameter can be used to add a list of values or add references to other Generators, Attributes, or Variables for generating data.