<$list fiter="[all[tiddlers]each[state]get[state]sort[]]" variable=state>
<$list fiter="[all[tiddlers]state<state>each[region]get[region]sort[]]" variable=region>
<$list fiter="[all[tiddlers]state<state>region<region>sort[]]">
<<currentTiddler>>
</$list>
</$list>
</$list>
Good of you to think about this. Perhaps rather than take the path you are thinking what about looking at intermediate sorts or finding a way to do do nested filters.
I am thinking of my nested list algorithium above which needs only the input and state and region to be provided. Perhaps a widget or macro we provide input and one or more group folters, that builds the required nested lists.
Would that produce the type of sort you suggest.
Regards
Tony
I do not mean to sound competitive, but all you need is .nested lists
<$list fiter="[all[tiddlers]each[state]get[state]sort[]]" variable=state>
<$list fiter="[all[tiddlers]state<state>each[region]get[region]sort[]]" variable=region>
<$list fiter="[all[tiddlers]state<state>region<region>sort[]]">
<<currentTiddler>>
</$list>
</$list>
</$list>gives a list sorted by state then region then tiddler titlenot tested against datanote the groups state and region use "each" and the inner list only lists those with the same state<state> and region<region> at a timeto keep it tidy i use the same name as the field as the variable name generated by the each lists.state<state> means list all tiddlers with the state field = the value in the `<<state>> variable.you could wrap the whole thing or make it more levels deep however a new outer filter may need every filter to be updated. See how every list filter starts with all[tiddlers] a fresh, so if you want to operate on all tiddlers this is fine but only with tag[a] would need to read [all[tiddlers]tag[a] to each filter.
\define tiddlerset-filter() [all[]]
<$list fiter="[subfilter<tiddlerset-filter>each[state]get[state]sort[]]" variable=state>
<$list fiter="[subfilter<tiddlerset-filter>state<state>each[region]get[region]sort[]]" variable=region>