MULTI Variables

MULTI variable objects obtain a combination of values from two other Variable objects.

This topic provides information on the following:

Overview

Variables that use the "Multi" source setting obtain a combination of values from two other Variable objects. Use the variable tab to define the source variable and the type of value calculation.

Defining the Variable Settings

Field/Element

Description

Type This read-only field shows Multi as the variable type. You determine the variable type when you create the object. It cannot be changed once the variable is defined.
Variable 1
Variable 2

Definition of the two Variable objects that serve as values sources.

Variable 1 determines the number of columns. The reference columns' values of both variables are combined depending on the operation that has been specified. The reference column depends on the variable source: Key column (in static variables), first value column (variable source: SQL, SQL-internally, Multi), or the Filelist column (variable source: Filelist). Columns that are not included in Variable 2 do not include a value for the corresponding entries.

The values of Variable 1 are used if two Variable objects contain entries of the same name.

Note that the data type of the source variable's reference column should match the Multi variable's data type. Otherwise, an error occurs or the values are not available.

Operation

The mathematical process used to determine which values to retrieve from Variable 1 and 2.

  • Union: Retrieves all values of the Variables 1 and 2. If the variable entries are identical, the values of Variable 1 are used.
  • The values of the variable that is defined as Variable 1 is listed first in the Result/Key column entries followed by the values of Variable 2. Identical values in Variable 2 are ignored.
  • Intersection: Retrieves the values that are used in Variable 1 and are in Variable 2. If the values are identical, the Result/Key column entries of Variable 1 are used.
  • Difference: Retrieves all values of Variable 1 that are not contained in Variable 2. The Result/Key column entries of the variables are compared to each other.

Specifying Data & Formatting Settings

Column

Description

Data Type

The data type decides the format of the variable's value.

  • String: An alpha-numeric string. Blanks at the end of the string will be truncated. Leading blanks are retained. If the Limit Text Length checkbox is not checked, there will be no limit to the length of the character string.
  • Number: Any numbers in the specified area between 0 and 2147483647.
  • Timestamp: Any date or time value.
  • Time: A time value.
  • Date: A data value.

The exact format of the selected data type (with the exception of "String") can be determined in the Output Format field.

The data type of the values that are available in the first column is checked. The variable's data type must match the data type of the first column returned by the SQL statements when you use the sources "SQL" or "SQL internally". Data can also be processed using specific SQL statements. An error occurs if static variables should be stored or dynamic variables are accessed and the data types do not match.

Note the following if you change the data type of static Variable objects that already include values:

  • You can easily change "Number", "Timestamp", "Time", and "Date" to "Text". The values are converted without any changes.
  • An output format must be selected if "Text" has been changed to "Number", "Timestamp", "Time", or "Date". When the Variable object is saved, the system verifies that the values match the specified format.
  • You cannot directly modify the data types "Date", "Time", "Number", and "Timestamp". They must be converted to the data type "Text" before you can modify them.

The data type of variables with the type "Multi", "SQL", or "SQL internally" can be changed at any time.

The data type of the script variable in question ("float", "signed", "unsigned", or "string") is irrelevant in values that have been retrieved from Variable objects with the data type "Number" when using the script element GET_VAR. The value can always be stored. Algebraic signs and decimal places are removed if they are not supported by the script variable's data type. The values are always passed on to the script as a "string" if a different data type has been specified in the Variable object.

Output Format

This setting defines the format that should be used to store values in the Variable object (source: static variables) or to retrieve values from the data source (dynamic variables).

The contents of this selection menu depend on the data type. Several different formats are available for each data type (except for the String type).

The output format only refers to the first column. In static variables, this is the column Value 1; in Database and Multi variables, it is the first basic column. Note that Multi variables use the first basic column as their reference column. This means that the source variable's output format can affect the retrieved values.

The output format of static variables for a particular datatype can be changed at any time. In doing so, the values are converted to the new format. If the values do not match the old format, they cannot be converted to a new format.

The format that is used to enter value in static variables is irrelevant unless it is an AE-supported format of the data type in question. The values are then converted to the relevant output format.

The data type "Text" does not show this combo box.

Timestamp

  • Default format: YYYY-MM-DD HH:MM:SS

  • Available formats:

    • YYYYMMDDHH24MISS
    • YYYY-MM-DD HH:MM:SS

Date

  • Default format: YYMMDD

  • Available formats:

    • DD-MON-YYYY
    • DD-MON-RR
    • MM-DD-YYYY
    • YYYYMMDD
    • MMDDRR
    • DDMMRR
    • MM-DD-RR
    • MM/DD/RR
    • YYMMDD
    • YY.MM.DD
    • YY-MM-DD
    • YYYYMMDD
    • YYYY.MM.DD
    • YYYY-MM-DD
    • DDMMYY
    • DD.MM.YY
    • DD-MM-YY
    • DDMMYYYY
    • DD.MM.YYYY
    • DD-MM-YYYY
    • MMDDYY
    • MMDDYYYY
    • MM/DD/YY
    • MM/DD/YYYY

Time

  • Default format: HHMMSS

  • Available formats:

    • HHMMSS
    • HH:MM:SS
    • HHMM
    • HH:MM
    • MMSS
    • MM:SS

Number

  • Default format: 16 digits

  • Available formats:

    • 00.00
    • +00.00
    • -0.00
    • 0
    • +0
    • -0
    • 16 digits

Some date formats include RR as a placeholder for the abbreviated year. Having both YY and RR accommodates different century-counting conventions based on the two digits of the abbreviated year value.
YY - The current century applies for numbers between 00 and 80. The previous century applies for 81 - 99. 
RR - The current century applies for numbers between 00 and 49. The previous century applies for 50 - 99.

For example:
Date format DDMMYY and the resulting complete dates:
010305 - corresponds to 01 March 2005
010365 - corresponds to 01 March 2065
010380 - corresponds to 01 March 2080
010385 - corresponds to 01 March 1985

For example:
Date format DDMMRR and the resulting complete dates:
010305 - corresponds to 01 March 2005
010365 - corresponds to 01 March 1965
010380 - corresponds to 01 March 1980
010385 - corresponds to 01 March 1985

The time value for the data type "Time" or "Timestamp" must be a 4 or 6-digit number. Decimal places are removed. 4-digit numbers are converted to hours and minutes.

Examples:
Data type: Time
Output Format: HH:MM:SS
Value of the user or the data source: 1234, 1234.5, 123400, 12:34, 12:34:00
Resulting variable value: 12:34:00

Data type: Timestamp
Output Format: YYYY-MM-DD HH:MM:SS
Value of the user or the data source: 20110325 2201, 20110325 2201.5, 20110325 220100
Resulting variable value: 2011-03-25 22:01:00

Set min. value

Min. value

Enforces a minimum value.

The data type "Text" does not show these fields.

Set max. value

Max value

Enforces a maximum value.

The data type "Text" does not show these fields.

Limit text length

Max. Text Length

Enforces a maximum character length.

Allowed values: 1 to 1024

If this option is deactivated, there is no limit.

The Key column of VARA objects has a maximum limit of 200 characters. This limit always exists and cannot be increased or deactivated.

The result column of dynamic variables has no limit. The length depends on the value columns.

In static and dynamic variables, this limit refers to the first value column. The Key or result column is not checked.

Values that exceed the maximum length are excluded.

Only the data type "Text" shows these fields.

Force upper case

Lower case letters that are used in variable values are automatically converted to upper case. This only affects the first value column.

Only the data type "Text" shows this field.

Result Format

Definition of the result column's contents.

The first column that is displayed in the preview is the result column. The result column can show a combination of value columns and any other characters. This is defined via the Result Format.

Column numbers that were specified using curly brackets {} in the Result Format field will be replaced by the value of the corresponding column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Result Format: {1}_{2}
Result column: JOB01_WIN01

Without a Result Format being specified, the value of the variable's Result or Key column is assumed.

The values of the result column have to comply with the variable's limitations (min. value, max. value, limit text to), the output format, or the data type. Otherwise, the result column does not include a value.

Specifying the Script Access Setting

You can specify what happens if a key is not found with the If key not found radio buttons.

To:

Choose:

Have an error message displayed if an object attempts to access an item that is not available at runtime via script Return error
Not use the result of output format of when it is " " Return initial values

Defining the Variable Usage in Other Clients

In client 0 you specify how the VARA object will behave in other clients.

When you define Variable objects in system Client 0, they can be used in other clients, either because they refer to the values set in the Variable in Client 0 or because you copy the original object from Client 0 to other clients and, if necessary, edit its values in the target clients.

With the Variable Usage in Other Clients options you define the behavior of this Variable object in clients other than 0:

Option

Description

Don't share but allow duplicates

If you select this option, this VARA object is available in clients other than 0 and you can use it there. You can modify all of its parameters in the non-0 clients, which can then be different per client.

The name of the variable can be kept in non-0 clients. This means that if there is already a VARA object in the non-0 client with this name, two independent VARA objects with the same name will be available.

You can modify all the parameters of both variables independently per client.

Share and allow read-only access

If you select this option, this VARA object is available in clients other than 0 and you can use it there but you cannot modify any of its parameters.

Additionally, the name of this VARA object must be unique system-wide.

Share but keep attribute settings from system client

If you select this option, this VARA object can be copied to non-0 clients. If you do so, it keeps all the definitions made on the Attributes page but you can edit the Key and Value settings in the non-0 clients. Each client can have its own Key/Value definitions.

Only available for STATIC variables.

Previewing Commands

To preview the variable, click Preview. A preview of the result values is displayed.