When a field is set to a literal 'null' and a query is made gr.addQuery(field_name,'null'), the result shown is not expected. Issue When a field is set to a literal 'null' and a query is made gr.addQuery(field_name, 'null'), the result shown is not expected. This could be replicated OOB by importing the XML record attached. It will create a record in the cmdb_ci_ip_address table with a value of "null" in the dns_domain field. ReleaseAnyCauseThe issue was caused when a user tried to query the table for this record with this script and steps tor replicate below: STR:1. import XML attached2. go to /sys.scripts.do3. Run query below:var gr=new GlideRecord('cmdb_ci_ip_address');//Returns 0 when this is uncommented, but 1 when it isgr.addQuery('dns_domain','null');gr.query();gs.print("@@111");gs.print(gr.getRowCount());gs.print("@@222");while ( gr.next() ) {gs.print("@@333");//gs.print(gr.sys_id);gs.print("@@444");}EXPECTED:to have one record returned that has a null valueRESULT:query with null parameter does not bring up any recordsResolutionThe issue here is bad data. The SQL trace for the example I created on the defect shows the correct output for either option: SELECT cmdb0.`sys_id` FROM cmdb cmdb0 WHERE cmdb0.`sys_class_path` = '/!!/!Y' AND cmdb0.`dns_domain` IS NULL gr.addNullQuery() is the supported way to null check. This would work with correct data. When I change the field value to NULL instead of null the gr.addNullQuery() works as expected. Related LinksAnother option is to use gr.addQuery('dns_domain','IN','null'); This also ended showing the correct result.