I have two different lists of tiddlers generated in such a way that I can’t really combine them. I would like to get all tiddlers that are in both lists. I’m searched google and tried a lot of things on my own, but I can’t figure it out. Any ideas?
Thanks. I guess I was using the wrong search terms
Which terms did you search? May be we should add them with some context to the intersection docs.
Stuff like:
“Check if a tiddler is in a list”
“Find if a Tiddler is in both of two list”
All of course prefixed with tiddlywiki. Ironically the latter gives a hint to the proper result without the words tiddlywiki, but not with.
Hmm, while this is still kinda open:
<$button>
<$action-createtiddler
$basetitle={{!!title}}
tags={{{ [{!!title}backlinks[]tags[]] :intersection[tag[Class]addsuffix[Notes]] }}}
text={{{ [{!!title}backlinks[]tags[]] :intersection[tag[Class]addsuffix[Notes]] }}}/>
<$action-sendmessage $message="tm-edit-tiddler" param={{!!title}}/>
Create Note
</$button>
For whatever reason this only gives one tag/text when there really should be two. Any clear mistakes?
The filtered transclusion syntax for a widget attribute returns only the first result from the evaluation of the filter expression. To return multiple results you need to concatenate them. If your results have no spaces then this would be sufficient at the end of the filter expression:
:and[join[ ]]
To guard against titles with spaces you can do this:
:and[format:titlelist[]join[ ]]
Thanks so much That works perfectly.