Builders
Builders collect text, lists, lookup tables or numbers across many steps, including inside a loop, and give you the result once at the end. Adding to a builder changes the builder itself.
Create text builder
Creates a text builder: text that later steps append to in place, so anything appended inside a loop is still there afterwards, and that you read out once at the end. Efficient for building large text (e.g. transcripts or reports) without re-joining on every step. The builder only lasts for this execution and is lost after a wait/resume.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Initial text | Text | No | Optional text to start the builder with (empty if not set). |
Outputs
| Name | Type | Details |
|---|---|---|
| Text builder | Text builder | The new text builder. Use it in the other "Text builder" steps. |
Text builder: append text
Appends text to a text builder. This changes the builder itself, so there is nothing to pass on, and text appended inside a loop is still there after the loop ends. If a separator is set, it is inserted before the text only when the builder is not already empty (so a list builds "a, b, c" with no leading separator).
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Text builder | Text builder | Yes | The text builder to append to. |
| Text | Text | Yes | The text to append. |
| Separator | Text | No | Optional separator inserted before the text when the builder is not empty (e.g. ", " or a newline). |
Text builder: read the text
Reads a text builder out as an ordinary text you can pass to the other text steps. The builder is not emptied and can still be appended to afterwards, and the text you get is a snapshot, so later appends do not reach it.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Text builder | Text builder | Yes | The text builder to read. |
Outputs
| Name | Type | Details |
|---|---|---|
| Text | Text | The builder's full contents as a text. |
| Length | Whole number | The number of characters in the builder. |
Create lookup table builder
Creates a lookup table builder: a lookup table that later steps change in place, so entries you set inside a loop are still there afterwards, and that you read out once at the end. This is the difference from "Lookup table: set value", which leaves the lookup table you gave it alone and hands back a new one. The builder only lasts for this execution and is lost after a wait/resume.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Starting lookup table | Lookup table of Text to Any | No | Optional lookup table to start from (empty if not set). It is copied, so the original is never changed. |
Outputs
| Name | Type | Details |
|---|---|---|
| Lookup table builder | Lookup table builder | The new lookup table builder. Use it in the other "Lookup table builder" steps. |
Lookup table builder: set value
Sets a key on a lookup table builder. This changes the builder itself, so there is nothing to pass on, and an entry set inside a loop is still there after the loop ends. Setting a key that is already there replaces its value.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Lookup table builder | Lookup table builder | Yes | The lookup table builder to change. |
| Key | Text | Yes | The key to set. |
| Value | Any | Yes | The value to store under that key. Any type, not just text. |
Lookup table builder: remove key
Removes a key from a lookup table builder. This changes the builder itself, so there is nothing to pass on. A key that is not there is left alone rather than treated as an error.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Lookup table builder | Lookup table builder | Yes | The lookup table builder to change. |
| Key | Text | Yes | The key to remove. |
Lookup table builder: size
How many entries a lookup table builder holds right now. Use this while you are still building instead of reading the whole lookup table out, which copies every entry each time you do it.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Lookup table builder | Lookup table builder | Yes | The lookup table builder to count. |
Outputs
| Name | Type | Details |
|---|---|---|
| Size | Whole number | The number of entries in the builder. |
Lookup table builder: read the lookup table
Reads a lookup table builder out as an ordinary lookup table you can pass to the other lookup table steps. The builder is not emptied and can still be changed afterwards, and the lookup table you get is a copy, so later changes do not reach it.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Lookup table builder | Lookup table builder | Yes | The lookup table builder to read. |
Outputs
| Name | Type | Details |
|---|---|---|
| Lookup table | Lookup table of Text to Any | The builder's entries as an ordinary lookup table. |
| Size | Whole number | The number of entries in the lookup table. |
Create list builder
Creates a list builder: a list that later steps add to in place, so items added inside a loop are still there afterwards, and that you read out once at the end. This is the difference from "Add item to list", which leaves the list you gave it alone and hands back a new one. The builder only lasts for this execution and is lost after a wait/resume.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Starting list | List of Any | No | Optional list to start from (empty if not set). It is copied, so the original is never changed. |
Outputs
| Name | Type | Details |
|---|---|---|
| List builder | List builder | The new list builder. Use it in the other "List builder" steps. |
List builder: add item
Adds a value to the end of a list builder. This changes the builder itself, so there is nothing to pass on, and an item added inside a loop is still there after the loop ends. Items stay in the order the steps ran.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| List builder | List builder | Yes | The list builder to add to. |
| Value | Any | Yes | The value to add. Any type, not just text. |
List builder: size
How many items a list builder holds right now. Use this while you are still building instead of reading the whole list out, which copies every item each time you do it.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| List builder | List builder | Yes | The list builder to count. |
Outputs
| Name | Type | Details |
|---|---|---|
| Size | Whole number | The number of items in the builder. |
List builder: read the list
Reads a list builder out as an ordinary list you can pass to the other list steps. The builder is not emptied and can still be added to afterwards, and the list you get is a copy, so later changes do not reach it.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| List builder | List builder | Yes | The list builder to read. |
Outputs
| Name | Type | Details |
|---|---|---|
| List | List of Any | The builder's items as an ordinary list. |
| Size | Whole number | The number of items in the list. |
Create number builder
Creates a number builder: a running total that later steps add to in place, so amounts added inside a loop are still counted afterwards, and that you read out once at the end. The builder only lasts for this execution and is lost after a wait/resume.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Starting number | Decimal number | No | Optional number to start the total at (0 if not set). |
Outputs
| Name | Type | Details |
|---|---|---|
| Number builder | Number builder | The new number builder. Use it in the other "Number builder" steps. |
Number builder: add amount
Adds an amount to a number builder. This changes the builder itself, so there is nothing to pass on, and an amount added inside a loop still counts after the loop ends. Use a negative amount to subtract.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Number builder | Number builder | Yes | The number builder to add to. |
| Amount | Decimal number | Yes | The amount to add. A negative amount subtracts. |
Number builder: read the total
Reads the running total of a number builder, together with how many times something was added to it (total and count give you an average). The builder is not reset and can still be added to afterwards.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Number builder | Number builder | Yes | The number builder to read. |
Outputs
| Name | Type | Details |
|---|---|---|
| Total | Decimal number | The running total. |
| Count | Whole number | How many times an amount was added. |