There are tiddlers have field myfield and tagged with qst
some of them have field with no value (empty)
some have value in the field myfield including text, only whitespace (tab, space)
There are tiddlers have NOT field myfield and tagged with qst
I am looking for a TW correct script to filter all tiddlers tagged with qst, have the field myfield BUT with no value (empty) or whitespaces (again empty)
The \S should be any non-space character, so excluding it should leave you with only nulls/spaces, but in my quick testing it doesn’t seem to do that.
Another nut to crack in the field of empty-fields
How do I filter tiddler who do not have a field section-type … not even an empty one.
I tried this: [all[current]!has:field[section-type]] :filter[{!!section-type}trim[]is[blank]]
But this also shows Tiddlers with existing empty fields.
I am still trying to determine what you want (perhaps my problem). The original question in thread related to a special case where the field may contain whitespace. Is that what you are asking for?
So let us return you your question
If exclude the white space issue
That is if in a tiddler tagged $:/tags/ViewTemplate
<$list filter="[all[current]!has:field[section-type]] :else[{!!section-type}is[blank]]">
No section-type
</$list>
The first part of the filter is true if there is no section-type even empty, we say “No section-type”.
If the first is not true ELSE then “section-type” contains something
but we test if its blank and if so we say , we also say “No section-type”.
If there is a chance of whitespace other than blank/spaces we can add trim as before. [all[current]!has:field[section-type]] :else[{!!section-type}trim[]is[blank]]
Hi Tony, thanks but not yet -
the filter still shows tiddlers with an empty section-type field. The viewtemplate I need the filter for should be invisible there.