Skip to main content

Set Page Variable

Page variables are restricted to the page where they are created and cannot be accessed throughout the entire application like regular variables. Use this action to create a variable and assign a value to it within a Multipage App.

Configuration

ParameterDescriptionDefault
KeyName (string) of the page variable
ValueThe value to assign to the variable
DebounceTime in milliseconds to wait before executing the actionEmpty (no delay)
ToolJet - Action reference - Set Page Variable

Triggering via RunJS

await actions.setPageVariable('<variableKey>', <variableValue>);

variableKey must be provided as a string (enclosed in quotes), while variableValue doesn't require quotation marks if it's a numerical value.

ToolJet - Action reference - Set Page Variable
info

For a full quick-reference of all actions' RunJS syntax, see Run Actions from RunJS.