I’m bothered that I can’t see a simple way to do this. I want to combine more than one filter (with filter
-filter run prefixes) into a single filter run expression, using or, not and.
I’m trying to set my$:/DefaultTiddlers
to include all the incomplete tiddlers of a certain type… but I want to be able to set a field on the tiddler to note that the incomplete record is acceptable.
So I want something like this:
title: $:/DefaultTiddlers
[tag[Tag]!has[fld1]] [tag[Tag]!has[fld2]] :filter[!has[skip-empties]] OR :filter[skip-empties[no]]
<!-- ^^ -->
[[Other initially]]
[[Open tiddlers]]
[[Go here]]
But I don’t know how to do the highlighted OR
. Obviously for AND
, I would just concatenate additional filters. And I’m sure I could do it with a function. Or I could do it with temporary variables,
But I haven’t found a way to do this with basic filter syntax. I feel I’m likely just being blind; it’s probably there.
Any suggestions for how to do this?
This is mostly an academic exercise for me now. I met the same goals by making the checkbox for skip-entries
simply delete the field when it’s unchecked.1 Which means the field has value yes
whenever it’s set, and I don’t need to check the no
clause. But I am still curious about this, and bothered that I’m not coming up with something.
How would you do this?
1 Using uncheckactions
like this:
<$checkbox field=skip-empties checked=yes uncheckactions="<$action-deletefield skip-empties/>" />