text
or JSON
. Under the Value type dropdown, select the type of value you want to set. In the Value field, enter the value you want to set.
If you set the value as text
, the value of the state variable is stored as a string. If you set the value as JSON
, the value of the state variable is stored as a JSON object.
See how to access nested state variables that are set as JSON below.
wf.init_state
function:
_
).
@
syntax.
@
syntax.
state
variable. The state
variable functions like a Python dictionary, so you can access and update state variables by referencing the key.
Pass the state
variable to the function when you call it.
JSON
as the value type and a JSON object as the value.
You can also set nested state variables in custom Python code.
.
to access the different levels of nested state variables. For example, consider a state variable with the following structure:
title
of the first task in a blueprint or UI block, use the following syntax: