Mohammad.

That is brilliant!

I made many attempts at a filter but never was able to get it.  The missing 
piece for me is the currentTiddler in the criteria variable.  In the 
context of the list, currentTiddler is the surname.  It makes sense after I 
see it.  This indicates I am still not understanding macros and variables 
correctly.

Thanks again!


On Monday, August 30, 2021 at 4:29:58 PM UTC-4 Mohammad wrote:

> Ah, sorry I did not notice a sorted output was requested! This is the 
> final solution with sort capability!
>
> ```
> <ul>
> <$vars criteria="[all[tiddlers]surname<currentTiddler>count[]]">
> <$list filter="[all[tiddlers]!is[system]each[surname]get[surname]] 
> +[!sortsub:number<criteria>]">
>
> <li><$link/>(<$count 
> filter="[all[tiddlers]surname<currentTiddler>]"/>)</li>
> </$list>
> </$vars>
> </ul>
> ```
> Note, this works in TW 5.1.23+
>
>
>
> Best wishes
> Mohammad
>
>
> On Mon, Aug 30, 2021 at 11:58 PM amreus <harl...@gmail.com> wrote:
>
>> Thank you Mohammad,
>>
>> I have learned much from your wikis on github.
>>
>> However, in your enthusiasm I think you over-looked the desire to sort 
>> the names by count.  
>>
>> I thought I saw an old post that showed a possible way by using an 
>> intermediate list, prefixing the count to the title with a delimiter, 
>> sorting the list, and finally splitting the count from the title - but I am 
>> unable to find it using search, and also do not recall if the method could 
>> be applied in this case.
>>
>>
>> On Monday, August 30, 2021 at 11:28:26 AM UTC-4 Mohammad wrote:
>>
>>> Jim,
>>> Give a try with this script!
>>>
>>> <ul>
>>> <$list filter="[all[tiddlers]!is[system]each[surname]get[surname]]"> 
>>> <li><$link/>(<$count 
>>> filter="[all[tiddlers]surname<currentTiddler>]"/>)</li>
>>> </$list>
>>> </ul>
>>> You can also replace <$link/>  with <$text text=<<currentTiddler>>/>
>>>
>>>
>>> Best wishes
>>> Mohammad
>>>
>>>
>>> On Sun, Aug 29, 2021 at 6:15 PM Jim <jim....@gmail.com> wrote:
>>>
>>>> Not OP but in my case, I'd like to generate a list of surnames sorted 
>>>> by how many tiddlers share the same surname field.
>>>>
>>>> Output should look similar to this:
>>>>
>>>>
>>>>    - Took (26)
>>>>    - Brandybuck (24)
>>>>    - Baggins (24)
>>>>    - Bolger (22)
>>>>    - Boffin (18)
>>>>    - Gardner (14)
>>>>    - Gamgee (7)
>>>>    - Burrows (7)
>>>>
>>>>
>>>> On Sunday, August 29, 2021 at 9:10:08 AM UTC-4 Soren Bjornstad wrote:
>>>>
>>>>> Can you maybe upload a small wiki with some tiddlers that could serve 
>>>>> as an example? It's pretty difficult to go into more depth without any 
>>>>> data 
>>>>> to try it on.
>>>>>>
>>>>>> teric wikiery would be greatly appreciated...
>>>>>>>>
>>>>>>> -- 
>>>> 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 tiddlywiki+...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/tiddlywiki/4feea918-07db-46d9-9489-a23cea65658dn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/tiddlywiki/4feea918-07db-46d9-9489-a23cea65658dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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 tiddlywiki+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/d9293190-4bca-46ef-923a-d0ce0a8b0270n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/d9293190-4bca-46ef-923a-d0ce0a8b0270n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6bf6631c-5125-4e2d-af58-8909b4eeb9e8n%40googlegroups.com.

Reply via email to