- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 04:13 AM
hi all ,
there are two fields
1.assignment group
2.caller
when i select assign group caller will get populated with group members only
so here i created dynamic reference qualifier and called script include there below is the picture of what i did :
but on the form its not working it is showing me all the users which ever group is select.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 07:26 AM
simply use this in advanced ref qualifier
javascript: new GroupMembers().getgroupmembers(current.variables.variableName);
inside the script include accept this parameter and comment line 6
getgroupmembers: function(groupusers)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 06:43 AM
What will happen if there more than 1 member in the group? Which user it should populate.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 07:01 AM - edited 03-06-2025 07:03 AM
Hi @tushar_ghadage
In this case, you can use a reference qualifier on the caller field:
javascript: new youscriptincludename().methodname(current.assignment_group);
and write the below code in the script include
getMember: function(group){
var arr=[];
var grSUG = new GlideRecord('sys_user_grmember');
grSUG.addEncodedQuery("group="+group);
grSUG.query();
while (grSUG.next()) {
arr.push(grSUG.user.toString());
}
return 'sys_idIN' + arr.toString();
Please mark this as solution and helpful if this resolves your query.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 07:26 AM
simply use this in advanced ref qualifier
javascript: new GroupMembers().getgroupmembers(current.variables.variableName);
inside the script include accept this parameter and comment line 6
getgroupmembers: function(groupusers)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader