show the groups only where the requested by is a part of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 10:35 AM
Hey, i have a reference field which i have to populate with the groups for which the "requested by" is a part of "only". Help please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 10:39 AM
Hi @suprajam
Create Script Include as below and use advance reference qualifier to call it.
getGroups :function(){
var groupArr = [];
var uID = gs.getUserID();
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('user', uID);
grmember.addQuery('group.active', true);
grmember.query();
while(grmember.next()){
groupArr.push(grmember.group.toString());
}
return 'sys_idIN' + ret;
},
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-23-2022 10:43 AM
Thank you soo much, hey can i get the reference qualifier script plus i have already two more conditions added to the simple reference qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 10:45 AM
Hi @suprajam ,
Added in reply.
if it resolves your query then mark it as correct and close the thread,
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-23-2022 10:51 AM
YEAH SURE THANK YOU ILL TRY AND GET BACK