Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Agent Sorting
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1420429009

Message started by Ralph Alvy on Jan 4th, 2015, 10:36pm

Title: Agent Sorting
Post by Ralph Alvy on Jan 4th, 2015, 10:36pm

I'm trying to get a handle on how an Agent sorts its collected items when Don't Sort is its setting. What I would like is for it to sort (in this particular case, anyway) in the order seen in the list from which it grabbed the items. The Don't Sort setting doesn't seem to do this.

Title: Re: Agent Sorting
Post by Mark Anderson on Jan 5th, 2015, 4:18am

Short answer, in the Action Inspector's 'Sort' tab set the left pop-up ($Sort) to 'Name' and the right one ($SortTransform) to 'original note'. See more here and here.

The default sort, i.e. no sort, lets the agent just get on with things as it sees fit. In most cases the order of results reflects the $OutlineOrder of matched items but some factors such as complicated queries or agents querying other agents can result in unexpected ordering of results. for simple tasks the order doesn't usually matter. But, if a definite sort is needed do consider setting the sort/sort transform settings for the container as already described above.

Title: Re: Agent Sorting
Post by Ralph Alvy on Jan 5th, 2015, 10:22am

Ah, I see. Actually, to get what I wanted, I used OutlineOrder and OriginalNote, instead of Name and OriginalNote. Now its sorting perfectly mirrors my outline. Thanks.

Title: Re: Agent Sorting
Post by Mark Anderson on Jan 5th, 2015, 11:24am

You can sort ordinary containers as well as agents but with the former it makes sense to turn off (set to 'none') sorting once you're done as static notes won't alter their sort unless/until you do something to them. By comparison, agents potentially re-build their aliases (i.e. unsorted order) each agent update cycle.

Title: Re: Agent Sorting
Post by Mark Bernstein on Jan 5th, 2015, 11:43am

Actually, I frequently keep my containers sorted. For example, in my weblog Tinderbox, monthly archives sort posts by date; when I make a new note, itís automatically timestamped and sorted in the appropriate place.  

This can be taken to extremes, of course, but if you've got a container you want to keep sorted, and to which you sometimes add new stuff, you can keep its sort criteria.  (On the other hand, do remember that you've done this; a frequent support question involves an outline where notes canít be moved because they mysteriously spring back whence they came after a few second!)

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.