The ListGen Generator generates items in a provided list in sequential or random order. 

In This Article

Generator Parameters

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. 

Video Training

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.

How to use the ListGen Generator

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. 

Step 3a: Adding a Value to the list Parameter

A list of values can be added to the list Parameter. These values will be generated for the Attribute. 

  • Click on the input field and type in the value.

  • Press the Enter/Return Key or click the + Add button to the right to submit the value.

  • The value will appear to the right of the parameter name.

3b: Adding a Reference to the list Parameter

The list Parameter can also reference a linked Generator, an Attribute, or Organization Variable.

  • Double click on the input field to add a reference.

  • Select a tab (e.g., Domain Attribute, Attribute Generator) to view available items to reference. 

  • Click on the Plus + to add a reference.

  • The reference will appear to the right of the parameter name.


Step 4: Save the Generator Configuration

  • Click on the Save Generator button once finished.

  • The preview data for this example will appear as shown below: