For simple lists that works. I needed a more robust solution and solved the
problem with the following code: -simplified
\define displayAuthor(tiddlerName)
<!-- This macro (for demo purposes) displays the author's name in a
list. You can use the variable tiddlerName for any purpose -->
<li>$tiddlerName$</li>
\end
\define runMacroOnFilterIntersection(filter1, filter2, macroName)
<!-- This macro runs a passed macro once per value that exists in both
filter1 and filter2 -->
<$list filter="$filter1$" variable="filter1">
<!-- Now that we have one item from filter1 (in the variable
filter1), lets compare it to filter2 -->
<$list filter="$filter2$" variable="filter2">
<!-- We now have the first item in filter2 (In the variable
filter2) run the macro only if the two values filter1 == filter2 -->
<$reveal default=<<filter1>> type="match" text=<<filter2>> >
$macroName$
</$reveal>
</$list>
</$list>
\end
<!-- Example of a set of complex filter calls -->
<$macrocall $name="runMacroOnFilterIntersection"
filter2="[list[!!authors]]"
filter1="[field:title[$:/data/authors]indexes[]removeprefix[alt:]]"
macroName="<$macrocall $name='displayAuthor'
tiddlerName=<<filter2>> />"
/>
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6562a95f-51d1-4c22-9c5f-fdff9fd8508f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.