Soren, sorry about the delay-- this something low on my list of too many things to do, so I haven't been dedicating enough time to it. Let me export some shell tiddlers with the fields and values from the real world attempt at this issue.
Mohammad, good to see you responding as well. I tried your solution, it displayed the field values with counts but didn't sort them by the counts (count of fields with each value). Playing with things-- I inserted a <<criteria>> in the list so that each list result (see [1] beow) would show the criteria variable for each. It's displaying:
[tag[zz@]zztopiccount[]] **(note the "
zztopiccount
", zztopic being the field name)
It appears that it's not applying <currentTiddler> from the criteria $vars widget. The entire code (yours altered to work with my tiddlers selection) I used is below [2]. It displays what is expect but not sorting.
[1]
<li><$link/> (<$count filter="[tag[zz@AYoS]ayostopic<currentTiddler>]"/>) ::: <<criteria>></li>
[2]
<$vars criteria="[tag[zz@]zztopic<currentTiddler>count[]]">
<ul>
<$list filter="[tag[zz@]each[zztopic]get[zztopic]] +[!sortsub:integer<criteria>]">
<li><$link/> (<$count filter="[tag[zz@]zztopic<currentTiddler>]"/>) ::: <<criteria>></li>
</$list>
</ul>
</$vars>