Hi,
Unfortunately for me the days operator does not offer mutual exclusivity in the following filters.
The value interval3 is stored on each tiddler as an integer field, it is given a negative value for instance
-30
Here are my two filters, the difference between the two is the ! operator before the days operator, the first conditional tests if a tiddler is overdue and needs a review, the second tests if a tiddler does not require a review because it has been reviewed sufficiently recently.
If I wanted to review a tiddler every 30 days the value stored in the field interval3 would be -30.
<$list filter=’[all[current]!is[system]has:field[last-reviewed3]days:last-reviewed3{!!interval3}]’>
<$list filter=’[all[current]!is[system]has:field[last-reviewed3]!days:last-reviewed3{!!interval3}]’>
These filters are used to determine if a tiddler requires a review based on days elapsed since last review.
The problem I have is that the days operator returns true for both !days and days on the first day on which the tiddler needs review, I require mutual exclusivity between these two filters.
The problem from my perspective lies in the days operator itself as it does not play nice with code that is attempting “if then else” logic but that’s unlikely to change so I need to work around the issue.
The way I would like to solve this is to alter the value used in the last part of the first filter so that in pseudo code it made this test, the pseudo code is the…
!!interval3 -1
… part so if interval3 has a stored value of -30 I want to make the days comparison using the value -31.
pseudo code
<$list filter=’[all[current]!is[system]has:field[last-reviewed3]days:last-reviewed3{ !!interval3 -1 }]’>
Just struggling with this last aspect of my “review tiddlers” plugin at the moment two buttons appear on the tiddler toolbar which should be mutually exclusive, I’d like to polish off this one issue.
Thanks…