:PUT_VAR_COL
Use the :PUT_VAR_COL script statement to write a particular value to a specified line and column of a static VARA object. As opposed to the :PUT_VAR script statement, doing so does not affect other fields. The corresponding value is overwritten if the specified line or column already contains an entry.
Important!
- Specifying a dynamic VARA object in this script element with SQL, SQL-internal, multi, or data type sources results in a runtime error.
- The number of value columns is "1" for use with the static XML VARA object.
- The use of XPath expressions with the XML VARA object is possible, but depending on the database the Automation Engine system is being used with, individual XPath expressions may work differently. In such cases, please check with the database vendor.
Syntax
:PUT_VAR_COL VARA object, [Key], Column, Value
Parameters
- :PUT_VAR_COL
Stores a value to a particular column of a static VARA object - VARA object
Name of the VARA object to which a value should be assigned.
Format: AE name or script variable - Key
(Optional) Line in which the value should be stored. A new entry is created if the specified Key does not yet exist. This parameter is only optional if you use a static VARA object with the Scope setting No scope in its Attributes page. The VARA object only includes an asterisk symbol (*) as the Key in such a case.
Format: script literal, script variable or script function - Column
Number of the column in which the value should be entered.
Format: script literal, script variable or number without quotation marks
Allowed values:- 1-5
For static VARA objects
Number 1 refers to the Value 1 column, number 1 to the Value column 2, and so on. Static VARA objects include a maximum of 5 value columns.
Format: numeric
Note: You cannot change the value of the Key column of a static VARA object with this script statement. - A valid XPath expression
For XML VARA objects
Format: string
- 1-5
- Value
Value that should be written to the specified variable line and column.
Format: Script literal or script variable
Allowed value:- XPath expression
For XML VARA objects
Format: string
- XPath expression
Example 1
The following example retrieves the name of the superordinate task (workflow) and the task's own RunID. Subsequently, the RunID is written below the workflow name in column 3 of the VARA object VARA.JOBP.
:SET &JOBP# = SYS_ACT_PARENT_NAME()
:SET &RUNID# = SYS _ACT_ME_NR()
:PUT_VAR_COL VARA.JOBP, &JOBP#, "3", &RUNID#
Example 2
Using :PUT_VAR_COL to modify XML content requires a key that already exists in the XML VARA object. The following example assumes that VARA.XML.TEST2 contains the key KEY3, and that the value of the key is <test><value1>oldvalue</value1></test>. You can now modify the xml content as shown below and "oldvalue" will be replaced by the new value "test":
:PUT_VAR_COL VARA.XML.TEST2, "KEY3", "test/value1", "test"
See also: