MultiSort
Automatically sorts the children of any note labelled #multiSorted by multiple attributes and criteria.
Setup
Add #multiSorted="<sortCriteria>" to any note whose children you want sorted. The script runs at frontend startup and applies the sort order.
Sort string format
Attributes separated by ;. Each attribute can have colon-separated flags.
#multiSorted="priority:desc;area;startDateTime;title:caseInsensitive"
The example sorts children first by priority descending, then by area, then by startDateTime, then by title case-insensitively.
| Flag | Effect |
|---|---|
desc |
Sort descending |
caseInsensitive |
Ignore case when comparing |
Built-in attributes
noteId, title, dateCreated, dateModified are read from the note directly. All other names resolve via getLabelValue().
How it works
- Searches for all notes with
#multiSorted - Sorts each note's children using MultiSort Library
- Saves each child's sort position as
#multiSortedValue_{parentId} - Sets
#sorted=multiSortedValue_{parentId}on the parent so TriliumNext applies the order