Variables Page

object variables,assign variables to objects
{"URL":["/*.*/awa/pa_view_sheet_variables"],"heroDescriptionIdentifier":"ice_variables_page","customCards":[{"id":"ice_variables_inheritingObjAndPrptVaras","title":"Inheriting Object and PromptSet Variables","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_Variable_Page_Inheriting.htm","languages":["en-us"]},{"id":"ice_variables_inheriting_EXAMPLES","title":"Examples","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_Variable_Page_InheritingExamples.htm","languages":["en-us"]},{"id":"ice_variables_and_VARAs_main","title":"Variables and VARA objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Variables/Variables_MAIN.htm","languages":["en-us"]},{"id":"ice_inserting_variables_varas","title":"Inserting Variables/VARA Objects in Objects and Scripts","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Variables/InsertingVariables.htm","languages":["en-us"]},{"id":"ice_exporting_tables","title":"Exporting Tables","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/_Common/CommonFunctions/CF_CSVExport.htm","languages":["en-us"]},{"id":"ice_working_with_tables","title":"Working with Tables","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/_Common/CommonFunctions/CF_WorkingWithTables.htm","languages":["en-us"]}]}

As a developer and object designer, when you create an executable object, you can define variables that are specific to that object and store them with the object. To distinguish them from other types of variables, they are referred to as object variables. You define them on the Variables page of executable objects. The object variables that you have defined on this page can be used throughout the object, including its Process pages. The object variables that you define in parent objects can be inherited by their children.

When you restart an object, the variables are taken from the object definition and not from the original execution. This way, if an error occurs because of an object variable, you can correct the value in the object and restart again.

Object Variables in Scripts

To use object variables in scripts you need the :PSET script statement. It dynamically creates an object variable, which is valid for that particular execution. If an object variable of the same name already exists, its value is replaced by the new value.

If the object variable is modified by using the script elements :SET, :RSET or :READ, the value that has last been assigned is available in the object (Process, Post Process, Child Post Process pages). It is not necessary to explicitly assign this value using the script element :RSET (for example, to the Post Process page).

Order of the Variables

The order in which you define the variables matters. If you define several variables and one of the variables is referenced by others, make sure that you define the referenced variable first. Otherwise, the variables will not resolve properly.

Example:

You define four variables on the Variables page of a Job object. The first variable is referenced by the other three variables:

Order Variable Name Variable Value
1

&VARIABLE_0#

ABCD
2

&VARIABLE_1#

&VARIABLE_0#_EFGH

3

&VARIABLE_2#

&VARIABLE_0#_IJKL
4

&VARIABLE_3#

&VARIABLE_0#_MNOP

When you execute the object, all the variables are properly resolved because the referenced variable is defined (and therefore resolved) first:

ABCD

ABCD_EFGH

ABCD_IJKL

ABCD_MNOP

To Access the Object Variables

You define and edit object variables on the Variables page of the object.

  1. Open the executable object.
  2. On the navigation pane, expand Variables & Prompts.
  3. Select Variables.

To Add Object Variables

add object variables
  1. Open the executable object.
  2. On the navigation pane, expand Variables & Prompts and select Variables.
  3. Put your cursor in the Name cell and type the name of the object variable.
  4. In the Value column you have two options:

    • For simple vales, type it in the cell.
    • For more complex values, click the editor icon and enter the value in the Cell Editor.

    You can specify the values of object variables with or without quotation marks. Both single and double quotation marks are allowed.

    This list explains how the values are resolved depending on how you use the quotation marks:

    • string1234 resolves as string1234
    • 'string1234' resolves as string1234
    • "string1234" resolves as "string1234"
    • string'1234 resolves as string'1234
    • 'string'1234' resolves as string
    • 'string''1234' resolves as string'1234

    Note: You can populate this field using variables.

  5. Object variables can be used as external factors for calculating the Estimated Runtime of the object with the adaptive method. For this method to calculate and process the value of the variable correctly, you have to select the correct data type from the Use for adaptive ERT drop-down list.

  6. To define whether this object can inherit the object values of its parent object (for example, a Workflow or a Schedule), on the lower half of the page, expand the Settings section. In Inherit from Parent choose one option:

    • All Variables

      The object inherits all variables and VARA objects defined for its parent.

    • Only defined Variables

      The object inherits only the object variables defined for its parent. Prompt Set variables are only inherited if the Prompt Set object complies with these values and the value to be overwritten has not been changed in the Variables page.

    • No Variables

      The object does not inherit any variables from its parent object.

  7. Save your changes. You can start using this object variable in any of the attributes of this object that support variables.

Tip: To use variables or VARA objects to populate the Value entries, instead of typing them, click the variables icon to open the Insert Variables dialog. This dialog is also available in the cell editor.

See also: