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 04:58 AM
Hi,
You can filter on list view and copy query.
gr.addEncodedQuery("assignment_group=8a4dde73c6112278017a6a4baf547aa7^ORassignment_group=d625dccec0a8016700a222a0f7900d06^ORassignment_group=725eb7f4db9532000454f1351d96198c");
Mark as correct if it helps
Regards Mythily
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 05:01 AM
It should be like this:
gr.addEncodedQuery('group=a65710533505ef4006ef3c755775edfr^ORgroup=' + '^user=' + loggedinUser);
after ^ORgroup= you can add second sys_id and so on.....
Make sure group is the backend name of your field, it could be assignment_group because all OOB group field's name is assignment_group
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 05:33 AM
Hi ,
When adding the 3 group not working but when adding one group in the encoded query working fine.
gr.addEncodedQuery('group=f8970533505ef4006ef3c755775eafgt^ORgroup=y6570533505ef4006ef3c755775etyg^ORgroup=88aa717e1b115d904519cddf034b22cb + ' ^ user = ' + loggedinUser);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 05:40 AM - edited 11-02-2022 06:12 AM
make the below changes also make sure group and user are the backend names of the fields you are referring from the table, also the user and group fields should be reference fields as you are passing sys_id in your query
gr.addEncodedQuery('group=f8970533505ef4006ef3c755775eafgt^ORgroup=y6570533505ef4006ef3c755775etyg^ORgroup=88aa717e1b115d904519cddf034b22cb + ' ^ user = ' + gs.getUserID());
Raghav
MVP 2023