GET_ATT

Use the GET_ATT script function to return the value of an object attribute during the generation process.

If the object attribute is defined using a variable, the system resolves the variable and returns the value of the variable. The GET_ATT function stores the retrieved value in a script variable, and does not modify the original variable from which it retrieves the value. This script function can retrieve values that are stored in the following types of variables:

  • Script variables
  • PromptSet variables
  • Object variables
  • Predefined variables

For more information about variables, see Variables and VARA Objects.

Syntax

GET_ATT (Attribute)

Parameters

  • GET_ATT
    Retrieves the value of an object attribute

  • Attribute
    Name of the object attribute whose value to retrieve
    Format: AE name, script literal or script variable


Notes:

  • You can only retrieve values for attributes that the object has. For more information about the attributes whose values you can retrieve, see Attributes Page.
  • If the task is in an Agent Group, GET_ATT(HOST) returns the name of the Agent that processes the task, and not the Agent Group name. For more information, see Agent Groups (HOSTG).

Examples

The following example retrieves the Archive Key of an object and stores the retrieved value in a script variable:

:SET &START# = GET_ATT(ARCHIVE_KEY1)

In the following example, the GET_ATT function uses a script variable to retrieve a value, and stores the retrieved value in a different script variable:

:SET &ATT# = "JOBREPORT_FILE"  
:
SET &START# = GET_ATT(&ATT#)

The following example uses the script function to define a condition:

:IF GET_ATT(GROUP) = " " 
!...
 
:
ENDIF

In the following example, the PUT_ATT statement uses a script variable (&DST#) to define the target file in a File Transfer object. The script assigns a value to the variable and sets the attribute. The script reads the attribute and prints the value of the variable (C:\Temp\test2.txt).

:SET &DST# = "C:\Temp\test2.txt"

:PUT_ATT FT_DST_FILE = "&DST#"

:SET &DEST# = GET_ATT(FT_DST_FILE) 

:PRINT "Target file: &DEST#" 

Tip: Use the GET_ATT_PLAIN function to retrieve the name of a variable that is used to define an object attribute without resolving the variable.

See also: