Skip to main content

Item and List Inputs

How a node handles one value versus a list, and how to run a node once per item

Written by Holly Conrad Smith

Run the same setback, massing, or parking calculation across every lot on a site by controlling how each node takes in data. Every input and output on a Flow node accepts either a single item or a list of items. Knowing which one a node expects is the difference between a flow that works on one parcel and a flow that works on fifty.

Tell an Item input from a List input

A List connector shows its letter followed by [], for example F[]. An Item connector shows its letter alone, for example F. Hover over a connector to see its name and type. A list type ends in [⋯].

Item Connectors

List Connectors

What happens when you connect a single value to a List input?

Flow wraps a single value in a one-item list when you connect it to a List input. The node runs normally and treats the value as a list with one item in it.

What happens when you connect a list to an Item input?

Flow passes the whole list to an Item input as one value. The node runs once, on the list itself. It does not run once for each item. Most nodes then return an error or an unexpected result, such as a Cannot read properties of undefined error.

To fix this, choose what the node should do with the list:

  • Run the node once for every item with the Map node.

  • Pick one item from the list with the First Item or List Item node.

Work through other common Flow errors in troubleshooting a flow.

Run a node once for each item in a list

Use the Map node to run a node once for each item in a list. Map takes a list, runs the nodes connected to it once per item, and returns a list with one result for each item. For example, connect a list of lot geometries to Map to apply the same setback to every lot.

Set up a Map loop step by step, including how to use each item's index.

Did this answer your question?