Skip to main content
Version: 7.0

Runnable: Amend Variables

The module can modify the variables of executable object shown in the tab variables & promptsets. As input a b4A script is used.

Designation

Name
mc.ObjectVariableEdit
Aliases
RunnableVariableEdit

Configuration

Test mode (test-mode)
Activates a simulation mode
b4A script variable (command-vara)
A variable object containing commands to execute
b4A script file (command-file)
Name of a file containing the commands to execute

Description

The following commands are available

  • replace_key( index, <regular expression>, <new value> )
  • replace_value(index, <regular expression>, <new value> )
  • replace_value_part(index, <regular expression>, <new value> )
  • set_key_value(index, <regular expression>, <new value> )

If an object variable identifier is expected as a parameter, the complete identifier including the & must be specified. This is the case with replace_key and set_key_value.

A description of the format of b4A script commands can be found here.

Input parameters

Option b4A Script variable

The b4A script instructions can be stored in a static variable object. Any number of instructions can be used. The following rules must be observed for the definition.

  1. the key is a consecutive index
  2. the instruction is defined in the value1 field. Only the 4 named instructions are permitted here.
  3. the parameters for the respective instruction are entered in the value2 field, separated by a comma.

Option b4A script file

The b4A script instructions can also be stored in a normal text file. The following syntax must be observed for this::

replace_key(&KEY#,&KEY_NEW#)
replace_value(Old Value,New Value)
replace_value_part(&KEY#,&KEY_NEW#)
set_key_value(&KEY#,Value)

As shown in the code example, the b4A script instructions are stored line by line, whereby any number of instructions can also be defined here. It is important that each instruction is stored in a line. The parameters are passed to the corresponding function as comma-separated parameters.