- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2019 08:27 PM
Hi all,
I found an example of glide record query which is "var queryString = "priority=1^ORpriority=2";".
It's OR condtion, but I am looking for AND.
I have tried "AND" but it didn't work.
Anyone could help?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2019 08:46 PM
Hi Phoenix,
For making the query use AND use below
var queryString = "priority=1^priority=2";
in a better way to handle this; create your filter condition from table list layout and use that query in script
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
09-22-2019 08:30 PM
Hi
Just copy out the condition in the query builder of any list of choice. Then you can learn about the Syntax.
You can do so by right click on the breadcrumbs and copy the query.
Let me know if that answered your question and mark my answer as correct and helpful, please.
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2019 08:46 PM
Hi Phoenix,
For making the query use AND use below
var queryString = "priority=1^priority=2";
in a better way to handle this; create your filter condition from table list layout and use that query in script
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
09-23-2019 03:15 AM
Hi Phoenix,
"AND" clause will not work on choice type field because at a time only once vale can be selected.
For you knowledge below is the query:
var query = "priority=1^priority=2";
Please mark correct/helpful, If It's applicable for you.
Thanks,
Vinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2020 10:59 PM
var queryString = "priority=1^priority=2";
Its the way for And
var queryString = "priority=1^Orpriority=2";
for the Or
Thanks