I’ve a content type which content some cck field. One of the field has type text and it’s not required field. So it depends on user whether he/she wants to fill this field or not.
I’ve created a view to display all records with this field as exposed filter which is optional. When I want to apply filter “is empty (NULL)” from dropdown it’s showing me mix records. But I intended to get only those records in which this column value is NULL/EMPTY.
How can I configure my view Or apply changes to get desired record after filter.
Answering own question :
I think that it’s a bug in drupal exposed filter when you select [IS EMPTY (NULL)] from operator. What drupal do is actually hide the textbox. And when you hit the apply button because of this textbox is empty, it does not included in view query’s where clause
After some search and analysis what i found is –
In this file – sites/all/modules/views/js/dependent.js
If you make change where i placed comment
you will get the desired result which i was seeking.
You can verify this using hook__views_pre_execute()