:PUT_VAR_COL

Script statement: Stores a value to a particular column of a static VARA object.

Syntax

:PUT_VAR_COL VARA object, [Key], Column, Value

Syntax

Description/Format

VARA object

Name of the VARA object to which a value should be assigned.
Format: AE name or script variable

Key

Line in which the value should be stored.
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:

  • For static VARA objects: "1" to "5" (format: numeric)
  • For XML VARA objects: A valid xpath expression (format: string)

Value

Value that should be written to the specified variable line and column.
Format: Script literal or script variable

  • For XML VARA objects: xpath expression (format: string)

This script function writes a particular value to the specified line and column of a VARA object. Unlike with the script element :PUT_VAR, this does not affect other fields. If the specified line or column already contains an entry, the corresponding value will be overwritten.

Warning!

  • Specifying a dynamic VARA object in this script element (source: SQL, SQL-internal, multi or data type) results in a runtime error. Only static VARA objects can be filled with values using :PUT_VAR_COL.
  • When indicating the column number, keep in mind that static VARA objects only include 5 value columns.
  • For use with the static XML VARA object, the number of value columns is "1" only.
  • 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.

Notes:

  • The numbers between "1" (value column 1) and "5" (value column 5) can be used for the columns. The value of the Key column cannot be changed with this script element.
  • The parameter Key is only optional if a static VARA object is used with the setting "Scope" - "No validity keyword". In this case, the variable only includes the key (*).
  • A new entry is created if the specified Key does not yet exist.

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. Let's assume that "VARA.XML.TEST2" contains the key KEY3 and 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: