:PUT_VAR_COL
Use the :PUT_VAR_COL script statement to write a specific value to a designated line and column within a static VARA object.
Unlike the :PUT_VAR script statement, this action does not affect other fields. If the specified line and column already contain an entry, the existing value is overwritten.
Important:
- Specifying a dynamic VARA object (such as SQL, SQL-internal, Multi, or Data types) in this script statement causes a runtime error.
- When used with a static XML VARA object, the number of value columns is always 1.
- You can use XPath expressions with XML VARA objects. However, depending on the database that your Automation Engine system uses, specific XPath expressions might behave differently. Check with your database vendor for compatibility details.
Syntax
:PUT_VAR_COL VARA object, [Key], Column, Value
Parameters
| Parameter | Description | Format | Allowed Values | Default Value |
|---|---|---|---|---|
| VARA object | Name of the VARA object where the value will be stored. | AE name or script variable | n.a. | n.a. |
| Key |
(Optional) Line where the value should be stored. If the specified key does not exist, a new entry is created. This parameter is only optional for static VARA objects configured with No scope on their Attributes page (where the key is simply an asterisk *). Use the FORCE_VARA_KEY_CI key in the UC_SYSTEM_SETTINGS variable to force case-insensitive read/write actions on static VARA objects. When set to Y, the key is converted to and stored in uppercase. See FORCE_VARA_KEY_CI. |
script literal, script variable or script function | n.a. | n.a. |
| Column |
Number of the column where the value will be written. Note: You cannot use this script statement to change the value of the Key column itself. |
script literal, script variable or number without quotation marks |
|
n.a. |
| Value | The value to write to the specified variable line and column. | script literal or script variable |
|
n.a. |
Examples
The following example retrieves the name of the parent task (workflow) and the task's RunID. The RunID is then written to column 3 of the VARA.JOBP VARA object, using the workflow name as the key.
:SET &JOBP# = SYS_ACT_PARENT_NAME()
:SET &RUNID# = SYS_ACT_ME_NR()
:PUT_VAR_COL VARA.JOBP, &JOBP#, "3", &RUNID#
Modifying XML content with :PUT_VAR_COL requires a key that already exists in the XML VARA object. The following example assumes that VARA.XML.TEST2 contains the key KEY3, with the value <test><value1>oldvalue</value1></test>. The script modifies the XML content, replacing "oldvalue" with the new value "test":
:PUT_VAR_COL VARA.XML.TEST2, "KEY3", "test/value1", "test"
See also: