GET_VAR

Use the GET_VAR script function to return a value from a static or dynamic VARA object, or from an Agent variable. When you use this function to access a dynamic VARA object, the value is resolved. The value is retrieved directly from the data source (a database, variable, or directory).

Tips:

More Information:

Syntax

The syntax for this script function depends on the type of VARA object you want to retrieve the value from. For Static VARA objects and XML VARA objects, the scope defined for the VARA object also has an effect. For more information, see Defining the Attributes Page.

Static VARA object

XML VARA object

Dynamic VARA object

Parameters

Important! An error that occurs while dynamic VARA objects are being resolved results in a runtime error.

Return Codes

The script function has the following possible return codes:

The format of the returned value corresponds to the output format set on the Attributes page in the object definition. For more information, see Attributes Page.

The following behaviors apply depending on the type of VARA object, and scope if applicable.

Static VARA object

Dynamic VARA object

XML VARA object

Examples

The following example retrieves a value from a VARA object and stores the result in a script variable:

:SET &TEST# = GET_VAR(MM.END.PROCESSING, "BookingDate")

The following example uses script variables in the GET_VAR function:

:SET &VAR# = "MM.END.PROCESSING"
:
SET &VAL# = "BookingDate"
:
SET &TEST# = GET_VAR(&VAR#, &VAL#)

The following example uses the GET_VAR script function in a condition:

:IF GET_VAR(MM.END.PROCESSING, "BookingDate") = SYS_DATE("DDMMYY")  
!...
 
:
ENDIF

See also:

seealso

GET_SCRIPT_VAR

seealso1

Variables and VARA Objects

Script Elements for Variables and VARA Objects