GET_ATT

Script Function: This function returns the values of a task's attributes during the generation process.

Syntax

GET_ATT (Attribute)

Syntax

Description/Format

Attribute

Name of the attribute whose value should be retrieved.
Format: AE name, script literal or script variable.


Return codes

Value of the specified attribute.

Comments

The script function GET_ATT can be used to retrieve an object's attributes value during the generation process. You can only specify attributes that belong to the object.

A list of the attributes of all objects including the allowed values is available in the User Guide.

If the task runs in an AgentGroup, GET_ATT(HOST) returns the name of the agent on which the task is actually processed and not the AgentGroup name.

If you use Script Variables (Including PromptSet Variables) or Object Variables name as attributes (see: Reading and modifying attributes ), the result of reading this attribute by using GET_ATT() is the content of the specified variable (instead of the variable's name). Use the script element GET_ATT_PLAIN if the variables should not be resolved.

Examples

In the example shown below, the archive key of an object is retrieved and stored in a script variable.

:SET &START# = GET_ATT(ARCHIVE_KEY1)

Script variables can also be used in this function.

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

This example uses the script function to define a condition.

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

The following example uses a script variable in an object's attribute field. The variable "&DST#" is specified as the target file in a FileTransfer object. The subsequent script sets the attribute, assigns a value to the variable and reads the attribute. The returned value is the value of the variable "C:\Temp\test2.txt" (instead of the variable name "&DST#").  

:PUT_ATT FT_DST_FILE = "&DST#"
:SET &DST# = "C:\Temp\test2.txt"
:SET &DEST# = GET_ATT(FT_DST_FILE)
 
:PRINT "Target file: &DEST#"
 

See also:

Script element Description

:ADD_ATT

Adds recipients to a notification at runtime.
:REMOVE_ATT

Removes recipients from a notification at runtime.

:PUT_ATT Changes an attribute's value during the generation process.
:PUT_ATT_APPEND Extends the notification's message text at runtime.
GET_ATT_PLAIN Supplies the value of a task's attributes during its generation. Variables are not resolved.
GET_ATT_SUBSTR Supplies part of a notification's message text.

Script Elements - Read or Modify Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function