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.

On Friday, August 27, 2021 at 9:47:27 PM UTC-5 [email protected] wrote:

> Thank you for your response, you have always been helpful.
>
> I'm still working on it and studying your thread (Retrieving the number of 
> link paths to a tiddler, 
> https://groups.google.com/g/tiddlywiki/c/c_f9bfnp2KY/m/lMfu_WIpBAAJ ) 
> where you ranked tiddlers by number of backlinks.
>
> Where I'm going wrong-- I don't think a single list/filter (without a 
> subfilter or second filter) will  let me sort by the count I'm aiming for, 
> since the count of the root filter would just be the number of different 
> values of the field being filtered, not the count of tiddlers having each 
> different value.  Putting in the each[]get[]count[] in the sortsub with any 
> of the suffixes is producing any result.
>
> What I'm starting out with, this gives an alphabetical listing (rather 
> than the default listing without a sort which I assume is by field creation 
> time but not sure if that's so):
>
>
>
> \define fldcntvar() [:filter[count[]]
>
> <small><ol><$list 
> filter="[tag[zz@]each[zztopic]get[zztopic]subsort:integer<fldcntvar>]"><li><$view
>  
> field="title"/> - <$count 
> filter="[tag[zz@]zztopic<currentTiddler>]"/></li></$list></ol></small>
>
> I also tried $set and $var for the sortsub filter but stuck with macro 
> definition after seeing your work.
> On Wednesday, August 25, 2021 at 9:16:08 AM UTC-4 Soren Bjornstad wrote:
>
>> Unless I'm misunderstanding, sortsub[] with a filter containing count[] 
>> should do what you need. You might need to add the *integer* suffix to 
>> it though, or else it will sort the numbers alphabetically and not produce 
>> a very useful sort.
>>
>> On Wednesday, August 25, 2021 at 6:05:57 AM UTC-5 [email protected] 
>> wrote:
>>
>>> I saw references to sorting list results by the count operator but 
>>> didn't find the actual threads/posts about the method.
>>>
>>> I assume it will require a subfilter, because in a root list filter the 
>>> count just returns the count of the list results, not counts for each of 
>>> the list results.  
>>>
>>> The sortsub operation worked with anything involving the titles of the 
>>> list results (such as length) but not the count operator.
>>>
>>> What I'm aiming for is ranking/sorting results (greatest to lowest 
>>> counts) of such lists as tags and tiddlers tagged with each or
>>>
>>> fields and how many tiddlers have each value of a particular field such 
>>> as below:
>>>
>>> <ol><$list filter="[tag[zz]each[zzfield1]get[zzfield1]]"><li><$view 
>>> field="title"/> - <$count filter="[tag[zz] 
>>> zzfield1<currentTiddler>]"/></li></$list></ol>
>>>
>>> Any directions to threads about such esoteric 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d00d1016-3899-4886-9c4c-5eae92328a51n%40googlegroups.com.

Reply via email to