Description

Domain Variables are instance variables of a Domain and may be referenced by all of a Domain's Attribute's Generator's Parameters. 


A Domain's Variables may also be referenced by other Domain's Attribute Generator Parameters, making a Domain's variables global to other Domains. 


Domain Variables are versatile, when their values are modified, all referencing Generator Parameters immediately reflect the change. 


Three default Domain Variables are created for each Domain and you can also create your own custom Domain Variables.



Note: Use the Pencil icon to modify the variable value.

 

In This Article


Domain Variables Standard Naming Convention

Domain Variables have a standard naming convention.

  • global.domainName.variableName


Default Domain Variables

Each time a Domain is created, it is automatically assigned three default Domain Variables: 

  • global.DomainName.id - Defines the primary ID for a Domain, which represents the start range of the Id Attribute.
  • global.DomainName.loopCount - Defines the number of times a Domain's data is generated by a Scenario.
  • global.DomainName.seed - Used to make Generators that generate random data generate the same random data set for a seed value every time Scenario is being run.

The default value for each of these Domain Variables is 1. The value may be modified; however, these variables cannot be deleted from the Domain. You can add your custom Domain Variables as well. 



Custom Domain Variable Example

This example shows a custom startDate Domain Variable within the Domain Variables Pane.

  • global.User.startDate


id Domain Variable

A Domain is created with an id Attribute that is automatically assigned with the RangeGen Generator. The startRange parameter for the RangeGen Generator references the id Domain Variable. 


The ID value is initially set to 1, but can be changed to another user-defined value. All references to the id Domain Variable will instantly reflect the change.



Example: If the value of the id variable is changed to 100 for a Domain, then the id Attribute value will start at 100 and count forward by 1 for each record.


loopCount Domain Variable

The loopCount variable is useful when Scenarios contain Domains that are related to each other. By changing the value of the loopCount, it changes the amount of data generated. This value can be as large or small as desired.


Example: If the loopCount variable value is changed to 10,000 for a Domain, then 10,000 rows of data will be generated. 



seed Domain Variable

The seed variable can be used in the Generator configuration for generating the random data set to ensure that the same data is being generated each time for the same value of the seed. A different seed value will generate a different set of random data.



Example: Let's say you have two Domains and each has a Number Attribute. This Attribute uses the RandomGen Generator to generate a random number ranging from 1 to 50.

If a seed value is not entered for the Generator configuration, then the data will differ each time it is generated.


The seed value has been left as the default value of 1 for both Domains. 



When no seed value is entered, the preview will be different for each Domain's Number Attribute.

  • Domain A


  • Domain B


Let's enter a seed value of 10 for each Domain (A and B). .



Now, the Number Attribute for both Domains (A & B) will have the same generated values as shown below:



Note: If a different seed value is entered for each Domain's Number Attribute, then the generated values will be different for each Domain's Number Attribute.


Video Tutorials

The following videos provide additional information about Domain Variables: