Hello everyone and thank you for this very useful software.
I have a wiki of exam questions, and I tag them with tags like “Exam-N” to record that a question has been used in the Nth exam.
I want to build a page that lists the questions by their usage frequency, that is: used in 5 exams, in 4 exams, etc.
Right now I have a big map of filters that select all the possibile combinations (i.e.: for the 1-usage category, choose all tagged by Exam-1 but not the others, or by Exam-2 but not the others and so on) but obviously this approach will not scale. I have looked at solutions like this one: [[tw5] Filter tiddlers with exactly one tag. - #8 by EricShulman] but I don’t know how to filter the single tag names by prefix, and then how to count them.
For reference, what I want is something like this:
! Used 5 times
<<list-links filter:"[enlist{!!tags} <keep only tags starting with 'Exam-'> <count them> <keep tiddlers that score 5>" >>
The desidered result is that a tiddler tagged with, say “Exam-1,Exam-2,Exam-4,Exam-5,Exam-6” or “Exam-1,Exam-3,Exam-4,Exam-5,Exam-6” is listed, but one that only has “Exam-4,Exam-5” is not because its score is 2.
! Used 5 times
<<list-links filter:"[all[]] :filter[enlist{!!tags}prefix[Exam-]count[]match[5]]">>
Notes:
To find all tiddlers that match the filter, start with a filter run of [all[]]
Next, you need to use the :filter[...] prefix to keep the tiddler titles that match your criteria. Without this prefix, the result of the 2nd filter run would just be the number “5”
The :filter[...] filter run prefix also lets you use {!!tags} to examine the tags of each tiddler title retrieved by the preceding [all[]] filter run. Otherwise, {!!tags} would refer only to the tags field of the current tiddler (i.e., the one containing the <<list-links>> macro itself.)