The Variable object
Variables that store temporary state.
Each instance has a unique name with which to reference (e.g., myVariable1.value
).
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
Definition
await variable.setIn(options)
Parameters
Examples
Set the value of userKey
in variable
to userValue
.
variable.setIn({keyPath: 'userKey', value: userValue});
Definition
variable.setValue(value)
Examples
Set the current value of variable
to userValue
.
variable.setValue(userValue);