mfu
Hi All,
Situation: you have articles where not all struct fields were filled (e.g. because they are not mandatory, or the field was added later).
When using a simple table view without a filter, records with an empty field show up.
---- struct table ----
schema: metainfo
dynfilters:1
cols: %pageid%, Status, Author(s), %lasteditor%, %lastupdate%
rownumbers: 1
csv: 0
----
I struggle in filtering fields without a value
This works:
filter: Status ~ * --> shows all records /articles with a value in the status field
This does not work:
filter: Status !~ * --> the records with the empty field value are not displayed.
filter: Status !~ 1* -> works (the values in the field start with 1 .., 2..., 3... etc) all values that do not start with 1 are displayed.
My questions:
- Am I using the wrong comparator? Should I go with a reg-ex one?
- Is there a special "empty" string symbol like "" ?
- Bug or feature?
THX for sharing your experience/ideas.
Michael
rkaa
Brand new to struct here, but I think it's the comparator. Something like this should work:
---- struct table ----
schema: metainfo
cols: %pageid%
filter: Status <=0
csv: 0
----
If the field name is actually lowercase, and only the Title label is uppercase,
Not sure if aggregations are case sensitive. They ought to be..
Meaning if your field is actually called "status" (and only the Title/label is "Status"):
filter: status <=0
Tested in struct, seems to work.
Malapropos:
This approach didn't work when looking for empty mail fields in "structured data plugin".
The solution was a work-around:
filter: something_mails !~ *@*
Kind regards;
Kristin