This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

Sorting Agent Results

By default, agents have no specific sort order for their matches.

The user may impose a deliberate single or two-level sort using criteria set via the Sorting group of system attributes. These criteria can be set from the Create/Rename dialog of the agent, its Info view or by setting the attributes via action code.

There is no document-level setting for agent sort order. If it is desired to use a sort order across the TBX, there are two possible solutions:

When sorting by $OutlineOrder, the original note's value is used, regardless of whether the match is to an original or an alias. This gives speedier response whilst generally giving an acceptable sort order.

Sorting the contents of agents poses an extra problem to that of normal containers. This is because agents collect aliases of notes and in some cases the alias doesn't share attribute values with its original note, e.g for $Width and $Height - the intrinsic attributes of an alias.

Thus setting $Sort (and $SortAlso) for a given attribute may not always have the intended consequences. From v5.7.0, the sort transform pop-up menu has the option 'original note'. Setting this transform tells Tinderbox to use the originals note's value instead of the aliases, should the two differ.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Agent Queries : Sorting Agent Results