Reset Variables
The Reset Variables action is used to reset variables to their default values, as defined in their variable definitions.
This table describes the parameters for the Reset Variables action:
Parameter Name | Description |
---|---|
variables |
An array of variables. Here is an example: ["$page.variables.var1", "$page.variables.var2"] Note: If a single variable expression is provided instead of an array, it is implicitly treated as an array of one variable.Each expression in the array has to resolve to a variable or variable property, and variables must be prefixed with their scope:
|
Here's an example of a call to the Reset Variables action, in which two variables are to be reset:
await Actions.resetVariables(context, {
variables: [
'$page.variables.firstNum_pv',
'$page.variables.secondNum_pv',
],
}, { id: 'resetFirstAndSecondNum' });