Form scopes
The scope of a form input component refers to how its value is bound to a variable in the workflow payload. This binding uses expressions enclosed in double curly braces, such as {{variableName}}.
The scope of a component determines where the value is saved and where it can be accessed. You can use the following predefined scopes for input components:
- self
- Refers to data stored at the current process level. This is the default behavior of input form fields.
- parent
- Refers to the parent item relative to the current scope, for example the process that initiated the current process.
- root
- Refers to the top-level instance and works regardless of where the expression is being used in the execution tree.
Containers and scopes
Container components, such as subforms and panels that store data in a single variable, have their own scopes.
To read data from these scoped containers, you must indicate the scope, for example mySubform.variableName.
Because container components have their own scope, they are limited to it and cannot access data outside of it using the predefined scopes available to input components. To access data from outside the scoped container, use keywords that specify the outer scope:
- $itemParent
- Provides read-only access to the parent scope data, for example
{{$itemParent.variableName}}. - $payload
- Provides read and write access to the full workflow payload, for example
{{$payload.variableName}}.