Sorting

Home Overview Sorting

MoStacks is able to sort cards, i.e. automatically bring them into an order according to field values that act as sort keys, deciding which card comes first, which one second etc.

You can create and change sort keys on the Edit Sort Keys window.

A sort key is not restricted to a single field, but can consist of up to 5 fields. Using multiple fields results in a hierarchical sort: You can e.g sort addresses according to family name first, given name second, and if that's not yet enough (there might be several John Smiths) even a third criteria like city.

Not all field types can be part of a sort key because relations like is larger than and is smaller than that are of course absolutely necessary for establishing an order are not defined for all types of fields and controls: Sorting cards according to the values of picture fields does not make sense - how would you decide which picture is "smaller", and which is "larger"?

Note however that even sorting cards according to text fields which looks innocent enough can be complicated, if you bring locales and non-Latin scripts into play. Read more about this in chapter Sort Orders.

MoStacks can sort in ascending (smallest first) and in descending (largest first) order. You can even specify the sort way for each of multiple fields within a sort key independently, but this can quickly get rather confusing if you don't know quite well what you want to achieve.

There are two principal ways of using sort keys. First you can use a sort key together with the Keep cards sorted? background flag (see the chapter about the Edit Backgrounds window). For the corresponding background MoStacks takes complete control over the order of its cards and always keeps them ordered according to the sort key. You don't insert a new card at a position of your liking, but MoStacks will determine its place within the already existing cards automatically after creating it.

Second you can tell MoStacks to use a sort key to sort the cards of a background, as a one-shot affair: The cards will be sorted, but after that you can again move cards around and insert new cards at any position of your liking.