You are here:
Collection Sort Element
Reorder the items within a collection and optionally limit the number of items that remain in the collection after the sort.

Use more general search terms.
Select fewer filters to broaden your search.
You are here:
Reorder the items within a collection and optionally limit the number of items that remain in the collection after the sort.
| Field | Description |
|---|---|
| Collection Variable | The collection variable that is sorted. This field accepts any collection variable within the same flow. |
| Sort By | The field that the collection is sorted by. This field is only shown if the collection variable contains more than one field. |
| Sort Order | Sort the collection in ascending or descending order. |
| Put empty string and null values first | When selected, this element sorts records with an empty or null value in the Sort By field at the start of the collection. Otherwise, they’re placed at the end. |
| How Many Items to Keep After Sorting | Select Set the maximum number of items to determine the number of items that remain in the collection after the sort. |
When the Collection Sort element removes values or changes their order, it makes those changes directly in the selected collection variable.
If the collection variable contains more than one field, click Add Sort Option to sort by additional fields in order of greater to lesser priority. You can sort by up to 3 fields at a time.

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.