Multiple addEncodedQueries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 08:40 PM
Hi,
Quick question, can we add multiple encoded query on GlideRecord? is there any issue? like performance or any?
gr.addEncodedQuery(enQuery);
if (!gs.nil(additionalQuery)) {
gr.addEncodedQuery(additionalQuery);
}
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 09:06 PM
Hi Shankar,
that should be fine; I don't think any impact of using multiple addEncodedQuery()
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
04-21-2020 10:56 PM
Hi Shankar,
Yes, you can add multiple addEncodedQuery() in GlideRecord, it should not affect the performance or any other issues.
If my answer helped you, mark answer as helpful and correct.
Thanks and regards,
Megha.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 11:16 PM
Hi Shankar,
using addQuery() you can give filter based upon the one field, using addEncodedQuery() you can filter the record based upon the multiple fileds (you can copy the breadcrumb string and use as it is in encoded query under quotes).
For More details:-
Please mark reply as Correct/Helpful, if applicable. Thanks!
Regards,
Tushar