Make assignment group only visible for some on incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I need to make it so a few assignment groups are only visible to managers on the incident table. I saw some other posts that showed some advanced reference qualifiers, which will be great. The kicker is that I also need some simple reference qualifiers to always apply. Those are that active must be true and that the name does not contain **. Is it possible to do both of these things for a field or do these qualifications also need to be added to the advanced reference qualifier? If so, how would I format this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @Brent Cox ,
You cannot apply both simple and advanced qualifiers simultaneously on a reference field. The advanced qualifier overrides any simple one. You can do by checking the user's role and then call your function to return the assignment group list.
function():returnAssignmentGroups() {
// Get current user ID
var userId = gs.getUserID();
// Check if user is a manager (adjust logic as per your app)
var isManager = gs.hasRole('manager') || gs.getUser().isMemberOf('YOUR_MANAGER_GROUP_SYS_ID');
if (isManager) {
// Iterate over assigment group table and add sys_id's to list and return that list
} else {
// For non mangers' query the table as using simple filter, iterate the results, add to list and return the list.
}
}
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Brent Cox ,
I hope you saw my reply.
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. It will help future readers as well having similar kind of questions and close the thread.
Thanks,
Bhimashankar H
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
yes you can use advanced ref qualifier and use script.
what's your actual condition and how the filter should work?
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