$treat_blank_as_null and is_empty/is_null

I am using the $treat_blank_as_null = 1 setting so empty fields are stored in the DB as nulls and I have suppressed the null checkboxes. However, I discovered recently that the is_empty search operator no longer works. is_null does work to find "empty" records. It seems that null records are not considered empty.
For non-database people, the distinction between null and empty is irrelevant, and if $treat_blank_as_null = 1 then the site builder is saying there is no difference and I would expect that is_empty should work.

Is there any way to make is_empty work as is_null in this case?

It looks like I can change the English language file so "is_null" => "is empty".
If I do, will is_null always work or is there any circumstance where I would need to use is_empty?

You are using DaDaBIK version 10.2-Manarola enterprise, installed on 02-08-2020, the latest version of DaDaBIK is 10.3-Manarola released on 26-08-2020
PHP Version: 7.2.24-0ubuntu0.18.04.6
mysql version: 5.5.5-10.3.23-MariaDB-1:10.3.23+maria~bionic
Web server: Apache/2.4.29 (Ubuntu)
Client: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0
 

eugenio

Administrator
Staff member
Hello,
if you are sure you don't need to search for empty fields, you could remove is_empty from the list of the search operator for your fields in form configurator.

Yes, you can also change the label in your language custom file; dadabik will continue to search for NULL values but the user see it as something different.

At the moment there isn't any way to perform a search such as NULL OR EMPTY.

Best,
 
Top