Skip to main content

setBoundVariable

Binds the provided field on this node to the given variable. Please see the Working with Variables guide for how to get and set variable bindings.

If null is provided as the variable, the given field will be unbound from any variables.

Signature

setBoundVariable(field: VariableBindableNodeField | VariableBindableTextField, variable: Variable | null): void

Parameters

field

The field to bind the variable to.

variable

The variable to bind to the field. If null is provided, the field will be unbound from any variables. Make sure to pass a Variable object or null; passing a variable ID is deprecated.