- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 12:41 AM - edited 01-30-2024 12:42 AM
Hi everybody,
This is regarding querying the REST API.
First of all I know about the ISEMPTY operator but.. I was kind of expecting NOT LIKE to match empty values as well for string values?
I mean if I filter on short_descriptionNOT LIKESQL any short_description that does not have SQL in the name (like an empty one) should match this as well should't it?
Anyone have some insights in this?
Thank you.
Best regards,
Sidney
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:04 AM
Hi,
As per OOB configurations ServiceNow operator 'NOT LIKE' ignores empty record values.
If you want to include records with empty values as well then you need to apply query like below:
"short_descriptionNOT LIKESQL^ORshort_descriptionISEMPTY"
Your observation/expectation is correct but this is how it is.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:04 AM
Hi,
As per OOB configurations ServiceNow operator 'NOT LIKE' ignores empty record values.
If you want to include records with empty values as well then you need to apply query like below:
"short_descriptionNOT LIKESQL^ORshort_descriptionISEMPTY"
Your observation/expectation is correct but this is how it is.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:22 AM - edited 01-30-2024 01:22 AM
Thanks Anil.
I already had the code amended to include that ^OR statement before posting the question but was silently hoping for a different answer hahah.
It is what it is.
Thanks for the time taken to answer.
Have a great day.
Best regards,
Sidney
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:07 AM
Hi @Sidney-
First of all I know about the ISEMPTY operator
ISempty is like searching for blank value
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************