StS
1
Hello forum,
I tried to add a selection to limit the output list.
Building the filter depending from selected options:
<$let auswahl={{!!TidText}}{{!!allTid}}{{!!TidOrt}}>
Replacing
<$list filter="[all[tiddlers]] :filter[enlist...
width
<$list filter="[<<auswahl>>] :filter[enlist
will fail:
<$list filter="[<<auswahl>>] :filter[enlist{!!tags}prefix:caseinsensitive<tag1>] :sort:integer:reverse[<currentTiddler>get[text]length[]]" >
What is wrong with the syntax?
Thanks, Stefan
vuk
2
StS
3
Sorry @vuk - I didn’t get it.
<<auswahl>> has the correct values: [!has[Draft.of]!is[system]has[erstellt]
Where should I use single brackets in the filter statement?
Thanks, stefan
vuk
4
<$list filter="[<<auswahl>>] :filter[enlist
Here. Inside a filter you need to reference the variable as <auswahl>, just like you reference <currentTiddler>.
See examples of same mistake in the thread I linked above and examples of correct usage with explanation. here Those Pesky Brackets — ...and other wikitext punctuation
StS
5
I saw, there was a square bracket missing at the end:

→ fixed it.
This is also not working:
<$list filter="[<auswahl>] :filter[enlist{!!tags}prefix:caseinsensitive<tag1>] :sort:integer:reverse[<currentTiddler>get[text]length[]]">
In this code auswahl content is considered as text, although you probably want the result of the filter instead of the definition of the filter.
Try this (untested):
<$list filter="[subfilter<auswahl>] :filter[enlist{!!tags}prefix:caseinsensitive<tag1>] :sort:integer:reverse[<currentTiddler>get[text]length[]]">
Fred
StS
7
It works perfect - thanks a lot @tw-FRed!