What is the Enforce Type/Limit Option? 

Generator value limits are automatically enforced when importing a DDL or XTS. The Enforce Type/Limit option is enabled automatically for all Generators assigned during a DDL file or XTS import. It is an available option for every Generator and can also be configured for any individual Generator within a Domain. 


In This Article


When Should it be Enabled?

  •  It should be used whenever you want the generated data to be within a defined data type and size.


How Does Enforce Type/Limit Work? 

When enabled, it will limit generated data to the Type and Size defined within the Attribute for each Generator where this option is enabled. The enforced limit is based on the Type and Size Parameters for the Domain Attribute. 


As you can see in the example below, the Enable Type/Size option has been enabled for the NameGen Generator. Based on the defined type and size, First Names will be limited to 5 characters, as shown in the Preview Pane.



Integer Data Value Limits

The following limits apply specifically to integer data values: 


if (dataType == "tinyint") {
  limitValue = "127"
} else if (dataType == "smallint") {
  limitValue = "32767"
} else if (dataType == "mediumint") {
  limitValue = "8388607"
} else if (dataType == "int" || dataType == "integer") {
  limitValue = "2147483647"
} else if (dataType == "bit" || dataType == 'vbit') {
  limitValue = "1"
}


How to Manually Limit Generated Data Values for a Generator

Please note that this section shows how to configure this option manually for a selected Attribute and Generator. This will be done automatically when importing a DDL File or an XTS. However, the steps below can be followed to make manual changes after an import. 


This example will show how to set up the example from above. Complete the following steps to set this up manually for a Generator:

  • Select the Domain and Attribute.



  • Enter the Data Type (e.g., varchar, int, float, decimal).
  • Enter the Size limit for the Attribute.
  • Click Save once finished.



  • Click on the checkbox for the Enforce Type/Limit option in the Generator configuration.