- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 12:57 AM
Hello!
I have a catalog item that has 'assignment group' and 'assigned to' as variables. These are reference fields. I can populate the assignment group based on the client requirement. My problem is how to populate the assigned to reference field based on the assignment group. I think sys_user_grmember is needed to do this but I do not know how.
Please help!
Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 01:01 AM
yes you have to query on sys_user_grmember table, kindly have a look on below thread, it has mentioned script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 02:02 AM
Hi,
If this is the case then you can use Harshvardhan's solution.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 01:13 AM
Hi,
I would encourage using advanced reference qualifier on assigned to variable which would bring users from the group selected
assigned_to can get auto-populated only 1 member is in that group; for this you need onChange client script on group variable
If single user then auto-populate
If more than 1 user give message to user to perform the lookup
the advanced ref qualifier will take care of the users restriction when lookup is done
So it would be combination of Advanced Ref Qualifier + onChange Client Script
Sharing a link where script is mentioned and it is working fine
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader