Set
Create named variables in the current (local) scope.
Type
ctx.vars.set Block Context
Folder
basic/contextChannels
Any
Pipe
Value
Scope
Any
Set (palette name Set) writes named variables in the current scope. Inside a loop body those names stay in that body. Use Update to change a name that already exists outside this body.
You can also set starting names on Start and Lambda instead of a separate Set block.
Each row is a Key plus a Value (fixed or a context path). The same object is written to the data pipe.
Configure
| Setting | Description |
|---|---|
| Key | Name other blocks will use (for example status). Must be a valid Liquid and JavaScript identifier; reserved names such as args are not allowed. |
| Value | Literal or a variable path from this block’s context |
| Add variable | Appends the row |
Add as many rows as you need. Duplicate keys are ignored.
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the names are set |
Pipe schema
The next block reads this on the data pipe (pipe.value).
| Field | Type | Description |
|---|---|---|
| Set variables | object | One property per Key, with that row’s resolved value |
Downstream blocks can also bind the names directly (status, not only pipe.value.status).
Use case
- Inside a loop body, name the current item or a computed flag without changing the outer run.
- Build a small object of working values for the next few blocks in this scope.
- On the main path, create
total=0before a loop, then Updatetotalinside the loop.