Step Type: Assign Variables
The Assign Variables step creates new procedure variables or reassigns values to existing ones. This is useful for intermediate calculations, setting up values for later steps, or transforming data between steps.
When to Use
- To compute a value from previous step outputs and store it for later use
- To create new variables based on formula expressions
- To update existing variable values partway through a procedure
- To set up conditional values based on prior execution results
Configuration
Modifying Existing Variables
You can reassign values to variables that already exist in the procedure scope:
| Setting | Description |
|---|---|
| Variable | The existing procedure variable to update |
| Value / Formula | The new value or expression to assign |
Creating New Variables
You can also create new variables as output:
| Setting | Description |
|---|---|
| Variable name | Name for the new variable |
| Data type | The variable’s data type (String, Integer, List, Dictionary, etc.) |
| Value / Formula | The initial value or expression |
How It Works
- The step evaluates each variable assignment in order
- For existing variables, the current value is replaced with the new value
- For new variables, they are added to the procedure’s variable scope
- All assigned variables are immediately available to subsequent steps
Example
After an Extract Records step that produces a record_list, you might use Assign Variables to:
- Count the records:
len(record_list) - Extract a specific value:
record_list[0]['sys_id'] - Build a filtered list:
[r for r in record_list if r['active'] == 'true']
Comments
0 comments
Please sign in to leave a comment.