<ul><$list filter="[tag[Use Case]]" sort="title">
<li>
<$link><<currentTiddler>></$link>
</li>
</$list></ul>Which is not what I expected, most sorts, sort the numbers in ascending order and before the Alphabetic characters.
Is there some default I have to change?
Am I alone in thinking that a filter is different from a sort? Making sort subsiduary to filter seems illogical to me.
Regards Ric Evans
I have been exploring the filter mechanism in TW5. First I am surprised to find it classified as a Concept, rather than as a Widget, but as I have said before the logic of the TiddlyWiki language escapes me.
If I use the following code:-<ul><$list filter="[tag[Use Case]]" sort="title">
<li>
<$link><<currentTiddler>></$link>
</li>
</$list></ul>
<$list filter="[tag[Use Case]sort[title]]">
Am I alone in thinking that a filter is different from a sort? Making sort subsiduary to filter seems illogical to me.
[tag[task]!sort[modified]limit[10]sort[title]]On Monday, January 18, 2016 at 12:21:31 AM UTC-8, Richard Evans wrote:I have been exploring the filter mechanism in TW5. First I am surprised to find it classified as a Concept, rather than as a Widget, but as I have said before the logic of the TiddlyWiki language escapes me.Filters can be used as parameter values for several different types of Widgets, including $list, $set, various $action-* widgets, etc. They can also be used in some special cases, such as entering a filter expression into $:/DefaultTiddlers to automatically compute which tiddlers are to be shown at startup (e.g., put [tag[startup]] in $:/DefaultTiddlers, and then just add the "startup" tag to any tiddlers you want displayed).
If I use the following code:-<ul><$list filter="[tag[Use Case]]" sort="title">
<li>
<$link><<currentTiddler>></$link>
</li>
</$list></ul>
Which is the expected behaviour. It would seem TiddlyWiki has bugs.
The documentation for the <$list> widget does not include mention of a sort="..." parameter,
<$list filter="[tag[Use Case]]" sort="title">
<$list filter="[tag[Use Case]sort[title]]">
so I don't think any sorting actually occurred. Rather, I think you are just seeing the "natural" order (based on creation) of the tagged tiddlers. To actually sort the filter output, you should use the [sort[]] filter operator, like this:<$list filter="[tag[Use Case]sort[title]]">
Am I alone in thinking that a filter is different from a sort? Making sort subsiduary to filter seems illogical to me.
Filter operators work by modifying the current "input set" in various ways... adding, removing or changing the order of the items in the set. By default, the input set starts with all 'real' tiddlers (excluding shadow tiddlers). The [tag[...]] operator then selects only those tiddlers with the indicated tag value. The [sort[...]] operator then alters the order of the set of tiddlers.Sorting a set can be integral to the logic of filtering. For example, suppose I want to list, in alphabetical order, the ten most recent tiddlers tagged with "task". To achieve this, the filter expression would be:[tag[task]!sort[modified]limit[10]sort[title]]
Thank you interesting information, but not exactly germain to my question.
It would seem TiddlyWiki has bugs.
No <$list> does not mention of a sort parameter, but<$list filter="[tag[Use Case]]" sort="title">
works try changing title for 'created' or some other sort operation.
Even though it is not documented it seems to work.
<table><tr><td>
<$list sort="title"/>
</td><td>
<$list sort="modified"/>
</td></tr></table>
Your suggestion ofdoes exactly the same thing in my limited testing.<$list filter="[tag[Use Case]sort[title]]">
The original point I was making is that the order produced was un-natural from my point of view, putting numbers after characters.
Am I alone in thinking that a filter is different from a sort?
Making sort subsiduary to filter seems illogical to me.
This is an argument for re-using code not for subsuming the sort operation into filter.