A sort is a sequential arrangement of data, for example, an ascending sort by description lists the items whose description starts with the letter A first, then B, C, D etc.

The Tracker offers quick and saved sorts.

Quick sorts sort by one column at a time. You can only sort the columns currently displayed in the grid (but can't search calculated fields, which are derived from the values in other fields and are labelled '(calc)' in their grid column headings).

Saved sorts can sort ...

  • By more than one column at a time (but not calculated fields).
  • Using fields from the main table that aren't displayed.
  • Using fields from other tables that are or aren't displayed.

Calculated fields, which are calculated from the values in other fields, can't be sorted.

Saved sorts come in 3 types. 'System' sorts come with the Tracker and can be used by anyone. 'Organization' sorts are added by organization managers and can be used by everyone in their organization. You're the only person who can add, edit or use your own, personal 'User' sorts. Click the Tools icon in the grid menu then Sorts and all 3 types will be listed.

Descriptions grid sorts menu

  • If a saved sort is active, it's displayed with a check mark to its left.
  • Additional saved searches (if any) are listed next. Click one to run it.
  • Edit sorts ... is used to edit existing or add new saved sorts.
  • Default sort ... is used to select the saved sort you want to run by default when you first open the screen.

Saved sorts don't need to be complicated. The Descriptions table name sort, for example, could have been run as a quick sort.

Sorts grid with descriptions name sort

Why use a sort when a quick sort would do? Because sorts can be set up as a default.

RUN A QUICK SORT

  • Click a column heading for a quick, 1-column sort. The first click sorts ascending, the second descending.
  • Fields with '(calc)' in their headings are calculated from the values in other fields and can't be sorted. If you try to quick-sort a calculated field, nothing will happen.

RUN A SAVED SORT

  • Click the Tools icon in the grid menu then Sorts.
  • If a sort is active, it's displayed with a check mark to its left.
  • Additional sorts (if any) are listed next. Click one to run it.

EDIT OR ADD A SAVED SORT

  • Click the Tools icon in the grid menu, Sorts, then Edit sorts ...
  • Sorts grid with details item commence sort
  • Edit, add and/or delete sorts as you would any other data (descriptions of the column in the Sorts and Sort Clauses grids are in the Details section of this help screen), noting that it's often easier to ...

DUPLICATE A SAVED SORT

  • Click the Tools icon in the grid menu, Sorts then Edit sorts ...
  • In the Sorts grid, select the sort you want to duplicate.
  • Click the Tools icon in the grid menu, Macros then duplicate sort as user sort or, if you're an organization manager, duplicate sort as organization sort.

SELECT A DEFAULT SORT

Click the Tools icon in the grid menu, Sorts then Default sort .... Default sorts can also be specified in views.

  • If a page hasn't been opened during the current session, its main grid opens with its user default sort; if that's empty, the organization default; if empty, the system default; if empty, the sort specified in the view's SORT ID; if empty, unsorted.

  • If the user changes to a new view, its main grid opens with the sort specified in that view's SORT ID; if that's empty, the user default; if empty, the organization default; if empty, the system default; if empty, unsorted.

  • In both cases, if the main grid's view specifies a sub view, that sub grid opens with the sort specified in that view's SORT ID; if that's empty, the user default; if empty, the organization default; if empty, the system default; if empty, unsorted.

This approach gives you the ability to use one default when a page is first opened and another when it's opened in a different view or as a sub view.

Default sorts aren't used when a page that's previously been opened during the current session is re-opened. The re-opened page displays the most-recently-used saved (not quick) sort in both the main and sub grids.

Click the Tools icon in the grid menu, Sorts then Edit sorts ... to open the Sorts screen (organization managers can also click the Utilities icon in the main menu then Sorts).

Sorts grid with details item commence sort


FIELDS

  • (Sorts grid) TYPE. Saved sorts come in 3 types. 'System' sorts come with the Tracker and can be used by anyone. 'Organization' sorts are added by organization managers and can be used by everyone in their organization. 'User' sorts can only be used by their creator.
  • (Sorts grid) TABLE. The table you want to sort.
  • (Sorts grid) SORT NAME. Listed when you click the Tools icon in the grid menu then Sorts. Avoid duplicates!

  • (Sort Clauses grid) RELATION NAME. Lists the table's many-to-one relations. Used to sort using data from another table.

  • If the FIELD you want ends with ID, a RELATION is required, for example, DESCRIPTION ID in the Items table contains a pointer to the Descriptions table, not the 'English' descriptions you're interested in. Those are in the DESCRIPTION NAME field in the Descriptions table.

  • (Sort Clauses grid) FIELD ID. The name of the field you want to sort by. Calculated fields, which are calculated from the values in other fields, can't be sorted and aren't listed.
  • (Sort Clauses grid) DIRECTION. 'Ascending' (assumed if blank) or 'descending.'
  • (Sort Clauses grid) SEQUENCE. The order the sort clauses will be evaluated.

MACROS

  • (Sorts grid) DUPLICATE SORT AS USER SORT. If you want to modify a system or organization sort (or create a variation of a user sort), run this macro then modify the results.
  • (Sorts grid) DUPLICATE SORT AS ORGANIZATION SORT. If you're an organization manager and want to modify an existing system sort (or create a variation of an organization or user sort), run this macro then modify the results.