This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 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, most easily accessed via the Action Inspector's Sort tab. Other options include the agent's Get Info 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 several 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 does not 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. The sort transform pop-up menu has the option 'original note'. Setting this transform tells Tinderbox to use the original note's value instead of the aliases, should the two differ. The 'original note' transform is useful if you want the aliases to sort in the outline order of their original notes.

A Tinderbox Reference File : Agent & Queries : Sorting Agent Results