I am trying to search field which does not have any value (empty space).
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2e04ecbe-4091-4769-be39-f0e7fd3e12fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think you can do it this way, even though it's probably not very efficient:
<$list filter="[!is[system]!has[f]]">
<$list filter="[all[current]fields[]regexp[^f$]]" variable="ignore" >
<$link><$text text={{!!title}}/></$link>
</$list>
</$list>
I always expect has[foo] to contain tiddlers even if the value of foo is empty.I guess that's just me.
Best wishes,— tb
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/58c12440-3be6-4a19-9281-87836d92954c%40googlegroups.com.
I always expect has[foo] to contain tiddlers even if the value of foo is empty.I guess that's just me.
I agree that it’s strange. Looking at the code, the extra check for the field being empty was added explicitly in January last year:
It’s too late to change the semantics of the existing operator, but I’d certainly be interested in backwards compatible ways of addressing the problem in the original post.
--
Best wishes
Jeremy
Best wishes,
— tb--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/58c12440-3be6-4a19-9281-87836d92954c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0C4C6B4E-34AE-42EC-8D9B-5BFDD81B30E1%40gmail.com.
Hi Tobias
It's true that it's a bit counter-intuitive, but I would assume that it's more common to use "has" or "get" in order to do something with the field value, and in these cases it's more convenient not to have to check if the value is empty before using it. That's how I interpreted it at least ;)
has:field[some-field]get:empty[some-field]<$list filter="[tag[HelloThere]get[foo]]">
value: <<currentTiddler>>
</$list>"[has[F]]" -- those input tiddlers in which field F exists"[!has[F]" -- those input tiddlers in which field F does not exist or has an empty value
In which case "[has[F]] -[!has[F]]" -- would return those tiddlers with a non-empty value for field F (the original output of "[has[F]]")
For me, negation should always be proper negation in terms of set theory. If a filter defines a set, then its negation needs to define the exact complement with respect to all available members, so that A && !A = ALL.
In which case "[has[F]] -[!has[F]]" -- would return those tiddlers with a non-empty value for field F (the original output of "[has[F]]")While this kind of optimization would work as you intend, I find it highly confusing.So, considering how things stand atm, to me it should be:
- has[f]
all items where the field f is defined and non-empty (as is)- !has[1]
all items where the field f is not defined or empty (as is)- has:field[f]
all items where the field f is defined, empty or otherwise (tbd)
- !has:field[f]
all items where the field f is not defined at all (tbd)Best wishes,— tb
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ca8b2d01-7750-43ca-8023-408f440941dc%40googlegroups.com.
You’ve made this point before. However, it is not true of the current filter operators, nor can we retrospectively fix it. So, that boat has sailed, and we have no choice but to continue to use “!” for the more informal sense of “inversion” that we use at the moment.