- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 09:47 AM
Hi All,
i would like to get List of groups (type = request) of user from requested for to a reference type field.
can someone help me with Script include and advanced reference qualifier.
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 08:32 AM
I would say this is the right way to do it on this request!!
--------------Script Include------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:26 AM
Open group table and check the type field and check the backend value.
Is the backend value "request"
If yes then please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:33 AM - edited 10-17-2023 11:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:45 AM
Hello @Ram050670
Use this Script include
getUserRequestGroups: function(userId) {
var groups = [];
var gr = new GlideRecord('sys_user_grmember');
gr.addEncodedQuery('user='+userId+'^group.typeLIKE'+sys_id_of_request record);
gr.query();
while (gr.next()) {
groups.push(gr.group.toString());
}
return 'sys_idIN'+groups;
},
Use the sys_id of this record which you have sent on above
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:53 AM
Didn't work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:58 AM