-
Notifications
You must be signed in to change notification settings - Fork 0
Sorting
Every column heading in an entity list is clickable. The first click sorts ascending, the second
descending, and the third hands the order back to the data block — no fourth state, and a column
does not remember its direction once you have moved on; switching to another column also starts
fresh at ascending. While a column sorts, its heading carries an arrow and announces the direction
as ascending/descending for screen readers.
One thing to know upfront: when the file opens, every list already stands sorted ascending by its first column — that is the house default, not the data block. The third click therefore lands on the raw data-block order, which can look different from what you saw when you opened the file.
The comparison follows the field type, not the characters on screen:
| Field kind | Ordered by |
|---|---|
number |
numerically — 10 sorts after 9, not as text |
date |
chronologically; ISO spellings compare lexically, which for dates is exactly chronologically, mixed formats of the same type included |
computed |
the value it produces — numerically when that value is a number |
reference |
the title of the record it points at — you sort what you see, not the id behind it |
attachment |
the file name only |
text, enum
|
localized text comparison (localeCompare) in the current interface language; an enum's value is its label |
Sorting orders what you can see. That is the whole point of resolving a reference to its title before comparing: an order by id would be an order with nothing visible to do with the list.
Records without a value in the sorted column stand at the bottom, in both directions. A missing value is not a small number and not an early date; left to the comparison it would drift to the top when descending, which is where nobody looks for "nothing". Equal values keep their data-block order, so ties never flicker between two positions.
Search and field filters cut first, sorting then orders what remains — sorting can never bring back what the filters removed.
The sort state lives in the session only, like search and filters: reload the file and the data-block order is back, and saving never writes a sort into the file. Switching entity tabs drops facets, field filters and sort for the entity you leave.