I’m hoping that I can explain what I’m trying to do clearly enough. Please let me know if clarification is needed. I want to be able to filter my tiddlers tagged Railroads, but be able to use something like a checkbox to include or exclude a selection of subfilters. For instance, initially my filter looks like this:
[tag[Railroads]prefix[F]]
But then I only want to look at street railways so I check the include box “Street” and the filter turns into this:
[tag[Railroads]search:rrfield[Street]]
But then I want to look want to look at everything else but street railways so I uncheck the include box and check the exclude box “Street” and the filter turns into this:
[tag[Railroads]!search:rrfield[Street]]
The above is a simplified example as I have many options that I would like to choose from. I could build up a filter that looks like this:
[tag[Railroads]prefix[F]subfiltersubfiltersubfilter]
and then feed the variables with fields. But the problem is these variables cannot be empty and when the checkbox is unchecked it would be empty. If any subfilter variable is blank, the whole filter fails.
I’ve tried different ways of concatentation and macro usage, but I’ve had no luck so far. I’m stumped at this point.
Is what I want to do even possible? If so, how would I approach it?
Thanks in advance!