Multiple addEncodedQueries

Shankar11
ServiceNow Employee
ServiceNow Employee

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);
}

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Megha Padale
Giga Guru

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.

Tushar Hirpurk1
Mega Guru

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:-

https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_re...

 

Please mark reply as Correct/Helpful, if applicable. Thanks!

 

Regards,

Tushar