StS
March 9, 2022, 9:14am
1
Hello forum,
how do I wrap this selection into <$list filter="..."/>?
Also the output should be counted and shown.
<span style="color: rgb(255,201,102)">Show: </span>
<$checkbox field="textTid" checked="[!has[Draft.of]!is[system]has[erstellt]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]"> Tiddler (with date) </$checkbox>
<$checkbox field="allTid" checked="[!is[system]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]" field="ort" unchecked="" field="textTid" unchecked=""> all Tiddler (with / without date) </$checkbox>
<$checkbox field="ort" checked="[is[system]" unchecked="" default="[!has[Draft.of]!is[system]has[erstellt]"
field="textTid" unchecked=""> System Tiddler only </$checkbox>
<span style="color: rgb(255,201,102)">sort by: </span>
<$checkbox field="dat" checked="sort[published]]" unchecked="sort[title]]" default="sort[published]]"> date </$checkbox>
<$checkbox field="abc" checked="sort[title]]" unchecked="sort[published]]" default="sort[published]]" field="dat" unchecked="" > alphabetical </$checkbox>
<$checkbox field="sort" checked="!" unchecked="" default="!"> reverse sort </$checkbox>
<br>''Filter is:'' {{!!textTid}}{{!!sort}}{{!!dat}}
Thanks
Stefan
Try “[{!!textTid}] [{!!sort}] [{!!dat}] +[join ]”
StS
March 9, 2022, 10:13am
3
no output with:
<$list filter="[{!!textTid}] [{!!sort}] [{!!dat}] +[join[]]">
</$list>
twMat
March 9, 2022, 10:27am
4
Note that it is unsafe to wrap the filter in single ". Use either triple """ or single '. This is possibly the reason why you don’t get the desired results, because the content in your filter can contain " and thus ruins the filter.
@StS tell us something about the list you want to use the created filter in.
StS
March 9, 2022, 10:36am
6
As created defind in the code the filter can’t contain " - see:
**Filter is:** [!has[Draft.of]!is[system]has[erstellt]!sort[title]]
For this is also no output:
<$list filter="""[{!!textTid}] [{!!sort}] [{!!dat}] +[join[]]""">
</$list>
It can be unsafe, but in this case it is only filter formats in use. However that is good general rule especially with transclusions of fields or tiddlers.
StS:
no output with:
Ah perhaps try setting a variable to your filter then use it as a subfilter
<$set name=myfilter filter="[{!!textTid}] [{!!sort}] [{!!dat}] +[join[]]">
<<myfilter>>
<$list filter="[subfilter<myfilter>]">
</$list>
</$set>
Tested OK
First you construct the filter as a variable then you use it as a filter.
There may be other ways
StS
March 9, 2022, 10:42am
8
I wish to choose, what and how my tiddlers should be shown. The output should be counted :
<$set name=total filter="[subfilter<myfilter>count[]]">
</$set>
StS
March 9, 2022, 5:32pm
10
@TW_Tones
Thanks - works as expected!