- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 12:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 02:26 AM
Dear @sonali bhagat,
Here 'usr' - is a Object (i.e it holds the glide record object which you are querying)
addEncodedQuery() - this is nothing but a filter which you want to apply which is encoded. When you right click on listview breadcrumbs and select copy encoded query ( this will be the filter query which you will pass as a value in addEncodedQuery() method. )
I hope this is clear 😉
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 12:39 AM
@sonali bhagat Please refer to https://developer.servicenow.com/blog.do?p=/post/training-encoded-query/ and https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/use/using-lists/concept... to know more about addEncodedQuery method and encoded query strings.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 01:48 AM
Hello @sonali bhagat ,
Please take a look at below links once to understand the concept in detail and let me know if you have any further doubt or queries or need any help in the scripting.
- How To Use addEncodedQuery() with GlideRecord in ServiceNow
- Encoded queries - the easy way to check\validate
- SIMPLIFY QUERIES WITH ENCODED QUERIES
- Encoded query strings
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks & Regards,
Aniket.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 02:20 AM
Hii
In usr.addEncodedQuery("") u need to set query which is copied from filter condition which u have copied from table
which is same as addQuery() method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 02:26 AM
Dear @sonali bhagat,
Here 'usr' - is a Object (i.e it holds the glide record object which you are querying)
addEncodedQuery() - this is nothing but a filter which you want to apply which is encoded. When you right click on listview breadcrumbs and select copy encoded query ( this will be the filter query which you will pass as a value in addEncodedQuery() method. )
I hope this is clear 😉
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....