As I've mentioned, the widget system isn't a complete tookkit or 
replacement for more conventional tools like javascript, or maybe SQL.

In this case, the only tool we have for getting counts is the count[] 
filter. But when you use count[], it's disassociated from the thing that it 
is counting. You just get a number. And you get it one at a time, so you 
can't sort the various counts. I guess, if you had a list of all possible 
count results reverse sorted (e.g. 5,4, 3,2,1) then you could filter for 
max possible count. It depends how open-ended you want your system to be. 

I think if it was me I would make an "update" button that does the counting 
for each fruit and then stores the number, either in a tiddler for each 
fruit or maybe in a data dictionary. After that it becomes easy to list the 
fruits the way you want. Some people seem to take umbrage at the suggestion 
of a pre-processor for "reports", but it sure solves a lot of problems when 
it comes to TW and widgets.

Have fun !!

-- Mark

On Friday, August 3, 2018 at 12:40:52 PM UTC-7, Dave wrote:
>
> Is there a way to sort the results of a filter by frequency of most common 
> to single instance?
>
> E.g. let's say a filter puts out the following:
>
> Apple pear Orange
> Pear 
> Orange banana
> Orange grapefruit
>
> How would you filter it further to result with something like this:
>
> Orange 3
> Pear 2
> Apple 
> banana
> Grapefruit
>
> Thanks,
> - Dave
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
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/2916b528-3018-4a8b-9517-c98d17cd7056%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to