Assigned to based on Assignment group and Vice Versa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 03:46 AM
So this customer has a requirement where they want to restrict Assignment group based on Assigned to Selection and Assigned to based on Assignment groups.
For example if a user is a member of 5 groups, then when his name is selected in Assigned to field, then those 5 groups should only be visible in Assignment Group field
Similarly, if I select an Assignment group field then only members of that assigned to group should be visible in Assigned to fields.
Both of these use cases should exist in the system together.
Any thoughts on this requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 03:52 AM
Hi,
Showing assigned to based on assignment group should happen without script using dependent field
something like this on assigned_to field
Now based on assigned to show the groups to which that user belongs; you will have to add advanced ref qualifier on group field
javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups());
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 04:08 AM
I already have a advanced reference qualifier which needs to be there as it. So how is it possible to append this with the existing reference qualifier.
nameISNOTEMPTY^typeNOT LIKE123a45ac6f7a890123456b7890123e4f^EQ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 04:11 AM
Hi,
like this
javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups()) + '^nameISNOTEMPTY^typeNOT LIKE123a45ac6f7a890123456b7890123e4f^EQ';
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 05:03 AM
So all the assignment group disappears with this filter and concerned group is visible when we select a user in Assigned to. But the requirement is If a user wants to select assignment group then all the groups should be visible if assigned to is empty
and if the user fills up an assignment group, then only group members should present in assigned to
and if assignment group is not filled and assigned to is filled then only assignment groups associated with the assigned to should be visible.