Accumulation Get Length¶
Returns the number of items currently stored in an Accumulation. If the input is not a valid Accumulation, it safely returns 0.

Usage¶
Use this node to measure how many elements are in an Accumulation during list-building or iterative workflows. Commonly placed after nodes that create or modify an Accumulation (e.g., Accumulate, Accumulation Head/Tail, List to Accumulation) to branch logic based on size, validate loop progress, or guard against empty collections.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| accumulation | True | ACCUMULATION | The Accumulation object whose element count should be computed. Must be produced by compatible Accumulation-related nodes. | {'accum': [1, 2, 3]} |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| length | INT | The number of items in the provided Accumulation. Returns 0 if the input is invalid or empty. | 3 |
Important Notes¶
- The input must be a valid Accumulation object produced by Accumulation-compatible nodes.
- If the input is invalid or does not contain an 'accum' collection, the node returns 0.
- Ideal for control-flow checks, such as confirming that an Accumulation is non-empty before retrieving items.
Troubleshooting¶
- Length is always 0: Ensure the input is connected to a node that outputs ACCUMULATION (not a plain list or other type).
- Unexpected small/large length: Verify upstream nodes are appending/removing items as intended before this node executes.
- Downstream errors using length: Confirm the length is greater than 0 before indexing into the Accumulation elsewhere.