sort

Use the sort function to return a collection sorted in ascending order (or descending, if specified). If every item in the collection is a number (or a numeric Text value), items are sorted numerically; otherwise, items are sorted alphabetically, without regard to case. Empty items in the collection are removed and not included in the result.

Note: Sorting a collection of non-text/non-number values (for example, an unflattened File Upload or People Picker column) is not meaningful and will leave the item order unchanged.

Function format

sort(Input Collection, Descending)

  • Input Collection: The collection to sort.

  • Descending (Optional): Set to True to sort in descending order. Defaults to False (ascending).

sort example

In an Expenses Repeating section, use sort to list the Amount column from smallest to largest, regardless of the row order entered by the submitter.

sort([120.50, 42.00, 89.99])

The formula returns the collection [42.00, 89.99, 120.50], the Expenses Amount column, sorted from smallest to largest.