Create a Simple Variable

(Available from version 7.0 onwards.)

A simple variable is a variable of type Text, Number, Decimal, DateTime, or Boolean. All simple variables in a project, after creation, are listed on the Assets Panel under Variables.

To create a simple variable:

  1. On the Assets Panel, hover over Variables, and click .

    The Variables and Types panel is displayed.

  2. From the Type dropdown, select a Simple variable type.

  3. Enter the Variable Name of the new variable. Each variable must have a unique name.

  4. [Optional] Specify the Initial Value of the variable when the solution is executed. If you do not specify an initial value, the variable value will be set as follows:

    • Text: (Blank)

    • Number: 0

    • Decimal: 0.0

    • DateTime: The default is set to the time at which the variable was first created in the project.

    • Boolean: False

  5. [Optional] Enter a Description.

  6. The variable is created, and listed under Variables in the Assets Panel.

Best Practices

Note the following best practices:

  • Use simple variables to store frequently used constant values. For example, create a text variable to store the text for a warning message that is used in multiple locations, or a decimal variable to store a frequently used value, such as a tax percentage. Doing so will simplify maintenance of your project, as opposed to hard coding such values into your project in multiple locations.

    Naming convention: Recommended practice is to name variables that hold constants with capital letters, for example WARNING MESSAGE or SALES TAX.