Figured it out. Both lists close at the end, otherwise the filter isn't 
maintained. In one variation,  I got a "List of Forms", one per actual 
item, which is what clued me in to the need for both list-closes to be at 
the end. The list of 5 was confusing me.


<table>
<tr><th>Path</th><th>Avatar</th><th>Taalen 
Name</th><th>Colorway</th><th>Day</th></tr>
<$list filter='[tag[avatar]each[pord]get[pord]nsort[]]' variable=apath>
<$list filter='[tag[avatar]pord<apath>sort[title]]'>
<tr>
<td> {{!!path}}</td>
<td><$link>{{!!title}}</$link></td>
<td> {{!!tname}}</td>
<td>{{!!colorway}}</td>
<td>{{!!adate}}</td>
</tr>
</$list>
</$list>
</table>



On Sunday, July 7, 2019 at 6:00:13 PM UTC-6, Mark S. wrote:
>
> Without having a sample of your data, it's hard to know. However, in (B) 
> the second </$list> has to go below </table> . Where it is now it will do 
> nothing.
>
> Once you've moved it, it should sort by pord (numbers) first, and then 
> inside of that grouping by titles.
>
> Good luck!
>
> On Sunday, July 7, 2019 at 3:56:33 PM UTC-7, Aidan Grey wrote:
>>
>> That's right, Mark - I don't want pord (which IS numeric) to be visible. 
>> It's only there for ordering.
>>
>> When I use the two <$list>  tags, I get 5 items in the list, all links to 
>> the current tiddler (see A below)
>>
>> The original I copied from earlier in this chain is:
>> <$list filter='[tag[client]each[2_surname]get[2_surname]sort[]]' 
>> variable=Surname>
>> <$list filter='[tag[client]2_surname<Surname>sort[1_givenname]]'/>
>> </$list>
>>
>> 2_surname = pord  AND  1_givenname = title
>>
>> You're right that I got the filter wrong, so I fixed it (see black B 
>> below)  but still get the same result - current tiddler title 5x. What am I 
>> still doing wrong?
>>
>> I found a solution, but it's labor intensive:
>>
>> 1. added this as new field: sord: {{!!pord}} {{!!title}}
>> 2. used this filter:  <$list filter="[tag[avatar]] [tag[path]] 
>> +[!tag[noshow]] +[!sort[sord]]">
>> 3. for the extra tiddlers I wanted to force to top, sord = {{!!pord}} 1
>>
>> Not as labor intensive as manual method, but... still not ideal.
>>
>>
>>
>> A -----------------------------------------------------------------------
>>
>> <table>
>> <tr><th>Path</th><th>Avatar</th><th>Taalen 
>> Name</th><th>Colorway</th><th>Day</th></tr>
>> <$list filter='[tag[avatar]each[pord]get[pord]nsort[]]' variable=apath>
>> <$list filter='[tag[title]pord<apath>sort[title]]'>
>> </$list>
>> <tr>
>> <td> {{!!path}}</td>
>> <td><$link>{{!!title}}</$link></td>
>> <td> {{!!tname}}</td>
>> <td>{{!!colorway}}</td>
>> <td>{{!!adate}}</td>
>> </tr>
>> </$list>
>> </table>
>>
>>
>> B --------------------------------------------------------
>>
>> <table>
>> <tr><th>Path</th><th>Avatar</th><th>Taalen 
>> Name</th><th>Colorway</th><th>Day</th></tr>
>> <$list filter='[tag[avatar]each[pord]get[pord]nsort[]]' variable=apath>
>> <$list filter='[tag[avatar]pord<apath>sort[title]]'>
>> </$list>
>> <tr>
>> <td> {{!!path}}</td>
>> <td><$link>{{!!title}}</$link></td>
>> <td> {{!!tname}}</td>
>> <td>{{!!colorway}}</td>
>> <td>{{!!adate}}</td>
>> </tr>
>> </$list>
>> </table>
>>
>>
>> On Sunday, July 7, 2019 at 4:39:20 PM UTC-6, Mark S. wrote:
>>>
>>> There's a lot that's unclear here. What kind of value is "pord" ? It 
>>> should be numeric, since you're doing a numeric sort. But I don't see
>>> "pord" used in your output.
>>>
>>> If you want your table rows to follow the result of the inner list, then 
>>> you have to take out the / AND put a second </$list> after the table row 
>>> structure.
>>>
>>> BUT, you're not following Tobias' example. In the first list you filter 
>>> by tag avatar, but in the second you're filtering by "title" tag. So the 
>>> connection
>>> between the two lists is a bit random. In Tobias' example, both inner 
>>> and outer filters first use tag[avatar] .
>>>
>>> If you only have a small number of avatars, you could just filter by 
>>> tag[avatar] and use the list field to determine the sort order. The easy 
>>> way to do this is to click on an avatar tag, 
>>> then drag and drop the listed tiddlers until you have the order you 
>>> want. Now when you do a simple <$list filter="[tag[avatar]]">....</$list> 
>>> it should sort per the
>>> list.
>>>
>>> Good luck!
>>> On Sunday, July 7, 2019 at 2:38:08 PM UTC-7, Aidan Grey wrote:
>>>>
>>>> Thanks Mark,
>>>>
>>>> So here's my code - what am I doing wrong? If I leave the second 
>>>> closure, I get the current tiddler listed 5 times (as below). If I take 
>>>> out 
>>>> the second closure (remove / from the second $list), I get nothing.
>>>>
>>>> Also - do you (or anyone) know why an exclamation point doesn't sort 
>>>> before alphabet like everywhere else? Is there any way to force a specific 
>>>> item to sort first, like a custom sort list a la excel: ThisTiddler, a, b, 
>>>> c,. d...?
>>>>
>>>>
>>>> ----
>>>>
>>>> <table>
>>>> <tr><th>Path</th><th>Avatar</th><th>Colorway</th><th>Day</th></tr>
>>>>
>>>> <$list filter='[tag[avatar]each[pord]get[pord]nsort[]]' variable=apath>
>>>> <$list filter='[tag[title]pord<apath>sort[title]]'/>
>>>>
>>>> <tr>
>>>> <td> {{!!path}}</td>
>>>> <td><$link>{{!!title}}</$link></td>
>>>> <td>{{!!colorway}}</td>
>>>> <td>{{!!adate}}</td>
>>>> </tr>
>>>> </$list>
>>>> </table>
>>>>
>>>> On Sunday, July 7, 2019 at 2:55:48 PM UTC-6, Mark S. wrote:
>>>>>
>>>>> I don't think 
>>>>>
>>>>> sort[middlename]sort[givenname]
>>>>>
>>>>>
>>>>> can be depended on to sort correctly. It might work occasionally , 
>>>>> depending on your browser implementation. I think for 
>>>>> a reliable sort you have to use multiple list widgets, each nesting 
>>>>> the inner one as shown in the original discussion.
>>>>>
>>>>> My solution would be to make a button that would allow you to create a 
>>>>> "sortby" field for all your entries, and then sort by that field. This 
>>>>> would of course
>>>>> mean that you have to remember to press the "Sort" button to refresh 
>>>>> your list from time to time. For some reason, the idea that you have to 
>>>>> press a button before getting a result, something familiar to anyone 
>>>>> who's ever had to refresh a web page or calculations in a spreadsheet,
>>>>> seems to invoke pure horror among some individuals ;-)
>>>>>
>>>>>
>>>>>
>>>>> On Sunday, July 7, 2019 at 11:56:32 AM UTC-7, Aidan Grey wrote:
>>>>>>
>>>>>> Doesn't work for me anymore either.
>>>>>>
>>>>>> On Friday, March 16, 2018 at 3:20:39 AM UTC-6, Yaisog Bonegnasher 
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Tobias,
>>>>>>>
>>>>>>> I used to make use of the "simple" doublesort, but I noticed that it 
>>>>>>> doesn't work for me anymore. I'm currently on 5.1.15. I do not know 
>>>>>>> when it 
>>>>>>> stopped working.
>>>>>>> Can you confirm this or is it my installation of TW5?
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Yaisog
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Friday, December 18, 2015 at 1:27:39 AM UTC+1, Tobias Beer wrote:
>>>>>>>>
>>>>>>>> Hi again Tim,
>>>>>>>>
>>>>>>>> Quoting myself from 
>>>>>>>> https://groups.google.com/d/msg/tiddlywiki/pU2Hb-I9y0k/MIwHNOj_BgAJ
>>>>>>>> :
>>>>>>>>
>>>>>>>> *On Friday, 18 December 2015 01:24:59 UTC+1, Tobias Beer wrote:*
>>>>>>>>
>>>>>>>> Actually, correct me if I'm wrong, but sorting by multiple criteria 
>>>>>>>>> is far simpler than initially thought.
>>>>>>>>> All you need to do is reverse the order in your filter expresion, 
>>>>>>>>> from weekest sort criteria to strongest, e.g.: 
>>>>>>>>
>>>>>>>>  
>>>>>>>>
>>>>>>>> {{{ [tag[Composers]sort[givenname]sort[surname]] }}}
>>>>>>>>>
>>>>>>>>> Will have the output eventually sorted first by surname and then 
>>>>>>>>> by givenname.
>>>>>>>>> I have updated the doublesort demo accordingly: 
>>>>>>>>
>>>>>>>>  
>>>>>>>>
>>>>>>>> http://doublesort.tiddlyspot.com/ 
>>>>>>>>
>>>>>>>>
>>>>>>>>> Best wishes,
>>>>>>>>> Tobias.
>>>>>>>>
>>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ade8227b-871d-4865-bf4f-901b89f7770c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to