I am writing a macro with three parameters. If omitted, the third shall be equal to the first one. This cannot be hardwired of course! So I need to code it. With a filter.
\define itemlist2(tag:"thème", field:"theme", excluding)<$set name="rejecting" filter="[$excluding$]+[regexp[^.]then[YES $excluding$]else[NO $tag$]]">tag=$tag$, field=$field$, excluding=$excluding$, rejecting=<<rejecting>>.<br></$set>\end
This form of the set variable widget evaluates the filter and assigns the result to the variable as a space-separated list (using double square brackets for titles containing spaces).
<$set name="myVariable" filter="[tag[HelloThere]]"> <$text text=<<myVariable>>/> </$set>Filtered Item Variable AssignmentNEW IN: 5.1.14 This form of the set variable widget evaluates the filter and assigns the specified result to the variable as a single item (ie, not using double square brackets for titles containing spaces).
<$set name="myVariable" filter="[tag[HelloThere]]" select="0"> <$text text=<<myVariable>>/> </$set>