- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 02:55 PM - edited 09-20-2023 03:53 PM
Hello, all.
I recently setup an advanced reference qualifier on our assignment_group field to return groups that the assigned_to user is a member of. I'd like to further filter that query to show only a specific group type of "itil" and hoping one of you cold assist. Below is the script we're using...
javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups())
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 04:03 PM
Hello @Bcrant,
You should be able to add "^type=1cb8ab9bff500200158bffffffffff62" to the end of your query string to only show groups of type "itil". That would give you the following reference qualifier:
javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups()) + '^type=1cb8ab9bff500200158bffffffffff62';
Note that hardcoding the sys_id is frowned upon, but you could throw a basic query in there to dynamically grab the sys_id of the itil group type if you wanted. But this should at least point you in the right direction.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 04:03 PM
Hello @Bcrant,
You should be able to add "^type=1cb8ab9bff500200158bffffffffff62" to the end of your query string to only show groups of type "itil". That would give you the following reference qualifier:
javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups()) + '^type=1cb8ab9bff500200158bffffffffff62';
Note that hardcoding the sys_id is frowned upon, but you could throw a basic query in there to dynamically grab the sys_id of the itil group type if you wanted. But this should at least point you in the right direction.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 09:00 AM
Thank you for your feedback, @Aylee Andersen. Much appreciated.