A Filter that returns tiddlers with a field that is empty
60 views
Skip to first unread message
TonyM
unread,
Jul 25, 2018, 9:30:30 PM7/25/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
Folks,
As documented here https://tiddlywiki.com/#field%20Operator the "has" operator does not seem to have a way to filter that returns tiddlers with a field, that is empty.
We can force it to return fields that are empty along with those that are not empty,
but to get a list of tiddlers that have a field but are also empty seems impossible without a nested list and testing the contents of a field using the get operator.
Does anyone have a tricky way of using a single filter to list such tiddlers?
I think this may be an issue to raise in the GitHub issues.
Regards
Tony
TonyM
unread,
Jul 25, 2018, 9:54:01 PM7/25/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
I have answered my own question;
The filter will be
[has:field[fieldname]]+[!has[fieldname]]
It works on the basis that [has:field[fieldname]] returns all tiddlers with fieldname blank or otherwise
and that [!has[fieldname]] only returns tiddlers without fieldname having a value or even having the fieldname.
To satisfy both conditions the fieldname must exist but be empty.
Rergards
Tony
TonyM
unread,
Jul 26, 2018, 12:12:57 AM7/26/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
To assist future visitors
The opposite, has field with any value
is simply [is[current]has[fieldname]]
But an older example given to me was something like this