DOES NOT CONTAIN operator not working with glide record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 01:18 AM
I need to exclude some records with with short description that contains "XXX_PRO - ". I added the query condition in the glide record as below. There are so many other conditions where i am not able to add that as an encoded query. I added the below condition to the query, but still its fetching the records with the below text.
gr.addQuery('short_description', 'DOES NOT CONTAIN', 'XXX_PRO -');
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 01:24 AM
For multiple query you can use encoded query in glide record
For does not contain its:-
gr.addEncodedQuery('short_descriptionNOT LIKEXXX_PRO -');
For me it works.
If its helpful, please mark answer as correct
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 01:26 AM
You can add multiple queries in encodedquery
gr.addEncodedQuery('short_descriptionNOT LIKEXXX_PRO -^number!=INC0005505^ORnumber=NULL^state=2^assignment_group=8a5055c9c61122780043563ef53438e3');
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 01:33 AM
Hi,
use addEncodedQuery() and not addQuery()
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 01:44 AM