How to add 2 more group sys ID in the encoded query below?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 04:26 AM
How to add 2 more group sys ID in the encoded query below?
I want to add 2 group sys_id in the encoded query. How to add in this same encoded query string?
gr.addEncodedQuery('group=a65710533505ef4006ef3c755775edfr' + '^user=' + loggedinUser);
Regards,
sruthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 05:46 AM
Hi @sruthig ,
Can you try below encoded query :-
You missed one single quote after last group sys id.
gr.addEncodedQuery('group=f8970533505ef4006ef3c755775eafgt^ORgroup=y6570533505ef4006ef3c755775etyg^ORgroup=88aa717e1b115d904519cddf034b22cb '+ ' ^ user = ' + loggedinUser);
Regards,
Gunjan Kiratkar
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 06:25 AM
Hi, @sruthig,
Please try the below code in the background script:-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 06:55 AM - edited 11-02-2022 06:56 AM
I see the problem with your sys_ids below :
gr.addEncodedQuery('group=f8970533505ef4006ef3c755775eafgt^ORgroup=y6570533505ef4006ef3c755775etyg^ORgroup=88aa717e1b115d904519cddf034b22cb + ' ^ user = ' + loggedinUser);
f8970533505ef4006ef3c755775eafgt,y6570533505ef4006ef3c755775etyg - > sys_id only include hexa decimal characters but why you have 'g', 't', 'y' characters in sys_id, also your sys_id length is more than 32 character which is wrong so please make sure you are using correct group sys_id.
Regards,
Abhijit
ServiceNow MVP