Using NULL or empty string in grid filters


#1

Hello

We’re using Pimcore 5.x. I try to find a way to do a filtering on column that has empty values. Attribute is Select field:

1 -> First option, 2 -> Second option, etc…

I’m able to filter rows based on options, but I would like to see only the rows where there is no value for this attribute. I’ve tried to use empty string, NULL word - nothing works. It is surprising that I cannot filter rows for null values.

Maybe it is possible?
Maybe I can use Operators? But I was noticed that I’m unable to do filters and sorts on column with operators.
Please, let me know.


#2

I´m having the same problem in the rest api. Any suggestions how to solve this?


#3

Actually you can create your own custom field with yes/no in Product and fill it: if some_other_attribute is NULL -> setMyCoolField(‘no’).

Then you will be able to filter for null values on your custom field.