Adding Predefined Variables to Objects and Scripts

In Automation Engine, you can use specific variables in attributes or in the scripts of executable objects. While these objects are being executed, the variables are replaced by the corresponding values. You can use the Insert Variables dialog to select predefined variables and insert them in the text fields of attributes or the scripts of executable objects.

Predefined variables is an umbrella term that refers to all:

Predefined variables are placeholders for values of the object in which they are used, a Variable object or the Automation Engine system. You can also retrieve and use System properties variables and Object properties variables values with script functions (such as SYS_ACT_ME_NAME). Using variables simplifies this procedure and reduces the length of scripts in objects.

Using Predefined Variables in Objects are not supported in Automation Engine Script and are therefore not replaced. Use the script elements GET_VAR/:PUT_VAR to access Variable objects.

Script or Object variables can also be used in attributes. More details are provided in the topic Attributes Pages of Executable Objects.

You can type in predefined variables manually or use the Insert Variables to validate the name.

Picking Predefined Variables from the Insert Variables Dialog

To pick a predefined variable with the Insert Variables dialog:

  1. Open the Insert Variables dialog shown below by clicking in an allowable field.
  2. Click to Expand

  3. Select a category from the drop-down list. The following options are available:
  4. Optionally specify a search in the Search field to limit the display results.
  5. The search is case-insensitive.

  6. Select a variable from the list.
  7. If the categories "System Properties" or "Object" are selected, the entries represent a short form of the relevant value.

    If the categories "Automation variables" or "Variable objects" are selected, the list displays the names of the Variable objects.

    When available, the variable's description is displayed below the "Variable name" field.

  8. If the variable you select has date or time format, select a format from the Format field.
  9. Some date and time formats include special characters which must not be used for variable names. The '_' character is always used as a separator in the variable name (instead of usual separators). At the end, another '_' plus an additional letter which identifies the original separator are appended to this format.

    Examples of separators are shown below.

    Dialog entry Date format Placeholder Value
    &$DATE_format# DD/MM/YYYY &$DATE_DD_MM_YYYY_s# 23/04/2017
    &$DATE_format# DD.MM.YYYY &$DATE_DD_MM_YYYY_p# 23.04.2017
    &$DATE_format# DD-MM-YYYY &$DATE_DD_MM_YYYY_d# 23-04-2017

    A list of all supported formats is included in Date and Time Formats for Automation Engine and Object Properties Variables.

  10. If the variable you select is a Static Variable object, optionally enter the key name and column number for the cell you want to select.
  11. Click Select.
  12. The variable is added to the field. If you specified a format or key and column, the variable name will be displayed accordingly. For example:

    The variable: With: Is written as:
    Current time The time format HH:MM:SS &$TIME_HH_MM_SS#
    Current date Thedate format DD_MM_YYYY &$PHYS_DATE_DD_MM_YYYY_d#
    VARA.RENTALS Key 1 and column 2 {VARA.RENTALS, 1, 2}

What you can find in this section:

You will find information on the scope, purpose and target group of this documentation, and on how to use it for best results.