The action updates the value of an existing variable that you identify by naming it in the action ($source in the screenshot below). The new value is the result of evaluating the XPath expression that you enter (see screenshot below). The Update Variable action therefore enables you to modify the value of a variable that was defined when the variable was initialized.
The variable to be updated can be any user-defined variable that is in scope at the point when the Update Variable action is triggered. These variables include: user-defined global variables; variables defined in the Let and Try/Catch Exceptions actions; variables in Action Groups; the parameters of a sub page; and the parameters and variables of control templates. (Note that the Update Variable action cannot be applied to Loop variables.)
At run time, if no variable with the given name is found, then an error message to this effect is generated together with a list of variables that are in scope at that point and may be modified.
|Note:||Application-defined variables (such as Dynamic Local Variables and Static Global Variables) cannot be modified by the Update Variable action.|