flatten

Use the flatten function to combine a collection of nested collections into a single-level collection. This is most useful with Repeating section columns whose values are not automatically flattened per row, such as File upload or People picker columns.

Function format

flatten(Input Collection)

  • Input Collection: The (possibly nested) collection to flatten.

flatten example

In an Expenses Repeating section, use flatten to combine the separate file lists attached to each row into a single collection of every uploaded receipt across all rows, so it can be counted or looked through as a whole.

flatten([["receipt1.pdf", "receipt2.pdf"], ["receipt3.pdf"]])

The formula returns the collection ["receipt1.pdf", "receipt2.pdf", "receipt3.pdf"], which combines every receipt file name from the two-row Expenses Repeating section into a single collection.