SORT

Description

SORT will sort the elements in a list. It works on numbers as well as on text. If a string starts with a number will come before strings starting with letters.

Example: Numbers

SORT([5, 76, 1])
This will return [1, 5, 76].

Example: Text

REVERSE(
SORT(['Benjamin', 'Anna', 'Laura', 'Annabelle'])
)
The sorting will return ['Anna', 'Annabelle', 'Benjamin', 'Laura'], which is then reversed, so the whole expression returns ['Laura', 'Benjamin', 'Annabelle', 'Anna']

Example: Text with Numbers

SORT(['Snow White', '101 Dalmatians', 'Aladdin'])
In this example, one string starts with a number. It will therefore come before the strings starting with letters, so this expression will return ['101 Dalmatians', 'Aladdin', 'Snow White'].
Last modified 4mo ago
Copy link
On this page
Description
Example: Numbers
Example: Text
Example: Text with Numbers