The Attributes tab is object-type specific and is only available in Variable objects. Use this tab to define the data types and the sources of values.
Object: Variable
Object class: Active object
Object type (short name): VARA
Field/Control |
Description |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Attributes | |||||||||||||||||
Source |
Reference source for the Variable object's values. The contents of the Variable tab depend on this setting. You must define the variable source when you create an object. It cannot be changed subsequently. Values can be written to the Variable object either manually by a user, or via a script (static). It can also be dynamically retrieved from a databaseA database is an organized collection of data including relevant data structures. (SQL), other Variable objects (Multi), or a computer (Filelist). The script elements :PUT_VAR, :PUT_VAR_COL, and :DELETE_VAR are only available for variables with a static source.
|
||||||||||||||||
Data type |
The data type decides the format of the variable's values. The exact format of the selected data type (exception: "String") can be determined using the attribute "Output Format".
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. Variable objects with the source "Filelist" or "Backend" are always created with the data type "Text". This type cannot be changed. Note the following if you change the data type of static Variable objects that already include values:
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. |
||||||||||||||||
The selected option defines the scope for static variables. This setting is only available in static Variable objects. The setting of the scope in a Variable object can be used to simplify the script that writes values to variables or reads them. Usually, the key must be specified as a parameter in the script element :PUT_VAR or GET_VAR, which makes it difficult to store particular values in a unique way. If the script does not include a key, the system automatically selects a key depending on the settings that have been made in the Variable object (such as the agent name in a job).
|
|||||||||||||||||
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.
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. For example: For example: 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: Timestamp |
||||||||||||||||
Min. value Max. value |
The maximum or minimum value of the Variable object. Only available for the data types "number", "date", and "timestamp". In static and dynamic variables, this limitation refers to the first value column. The Key or result column is not checked. The variable's source determines the behavior if this value has been exceeded:
|
||||||||||||||||
Limit text to: |
The maximum character length. This input field is only shown if the data type "String" is selected. 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. The behavior that follows an exceeded value depends on the variable's source:
|
||||||||||||||||
Upper Case |
Only for the data type "Text". Lower case letters that are used in variable values are automatically converted to upper case. Only affects the first value column (static and dynamic variable objects). |
||||||||||||||||
Sort |
Specifies the column whose values are used to sort the entries. Only available for static variable objects. Possible options: Key, 1, 2, 3, 4, or 5 |
||||||||||||||||
Sort order |
Type of sorting. This field is only displayed if the value "Static" is selected for the source. Possible options: Descending or ascending |
||||||||||||||||
Key not found | |||||||||||||||||
Error |
An error message is displayed if an object attempts to access an item that is not available at runtime via script. |
||||||||||||||||
Initial values |
Depending on the data type, an initial value is returned if an item does not contain a value at the time an object attempts to access it via script:
The result or output format is not used. |
The variable data types "Number" and "Timestamp" can only be selected if the scope "Freely selected" is specified. All other scopes require the data type "String". Otherwise, an error occurs when they are accessed using the script elements :PUT_VAR or GET_VAR, or when the Variable object should be saved.
This example illustrates the possible settings of a variable object.
Create the following objects:
The variable VARA.JP_NAME uses the scope "Workflow Name" and the variable VARA.JP_SESSION uses the setting "Workflow Session".
The job contains the following script, which writes values to the two variable objects:
:PUT_VAR'VARA.JP_NAME',,'VALUE'
:PUT_VAR'VARA.JP_SESSION',,'VALUE'
First, attempt to start the job. It fails because this task does not run within a workflow. Now start the workflow. It will be executed without error. The next step is to open the variable objects. The variable VARA.JP_NAME contains the name as key, and the variable VARA.JP_SESSION contains the workflow's RunID. Close the variable objects.
In the next step, restart the workflow. The variable VARA.JP_NAME remains unchanged; the variable VARA.JP_SESSION now contains two values. Remove the two workflows from the Activity Window. The variable VARA.JP_SESSION is empty because values saved in the job session are only kept until the workflow task is deactivated.
In the last step, duplicate the workflow object and execute both workflows. The variable VARA.JP_NAME contains 2 values with the names of the two workflows as keys.
The attribute "Variable type" is also available for variable objects that are created in system client 0000. This variable affects access to other clients' variable objects.
Field/Control |
Description |
---|---|
Variable type |
|
Not shareable |
The variable can only be accessed in the system client. Variables of the same name that are saved in a different client are not connected to the variable in the system client. |
Read only |
The variable can be accessed from other clients in read mode. Modifications can only be made in the system client. A variable of the same name cannot be created in other clients. |
Referenceable |
The variable can be copied to other clients using the drag & drop function. If the variable is accessed in "read" mode; it is first searched for in the client, and only if it is not available there is the one in the system client used. Access in "write" mode automatically creates the variable in the client if it does not yet exist there. |
The attributes of referenceable variables can only be changed in the system client. This tab is thus write-protected in user-defined clients.