We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to query out fields that have an empty value with GlideRecord?

Mitch Moses
Giga Expert

I tried this and it didn't work

current.addQuery('location', '!=', "");
current.addQuery('cmdb_ci', '!=', "");
10 REPLIES 10

ivaoen
Tera Contributor

Looks like you have old sys id's stored in the CI field - so they are not empty - they have a sys_id that no longer has a refrence so using like NULL or isEmpty will not work here.