
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 08:29 AM
Hi All,
Having a real problem with this one.
As the subject suggests, I would like to report in ServiceNow, on catalog tasks (sc_task) where the assignment group is not one of mine. In other words where the user of the report runs the report, and can see a list of all tasks that have been created by them, but for a group outside of any that the user is a member of.
I can't seem to find quite the right filter condition, as the IS NOT does not work on DYNAMIC groups, and clearly, I cannot just provide a list of groups.
The report has to work for ANY user, so I cannot use my own name in the filter.
Driving me nuts!
Thanks for your help!
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 08:43 AM - edited 11-28-2022 08:45 AM
try this
instanceName.service-now.com/sc_task_list.do?sysparm_query=assignment_group!%3Djavascript%3Ags.getUser().getMyGroups()&sysparm_view=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 08:55 AM
Set it up like this (use is not)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 08:43 AM - edited 11-28-2022 08:45 AM
try this
instanceName.service-now.com/sc_task_list.do?sysparm_query=assignment_group!%3Djavascript%3Ags.getUser().getMyGroups()&sysparm_view=

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 09:17 AM
Excellent! Thanks Mike. Works like a dream!
Couldn't see the wood for the trees - Having thought about it more now, I have seen this in the past!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 08:52 AM
@Mike_R Now I need to get this into a report. Unfortunately the filter option I'm building is not working in the same way.
I wish to put a filter in this report "Assignment Group" IS NOT ONE OF javascript:gs.getUser().getMyGroups();
"IS NOT ONE OF" is not a legitimate option, and whilst there is list returned by the function, it's all SYS_IDs.
Changing the filter condition to "Assignment Group.SYS_ID" IS NOT javascript:gs.getUser().getMyGroups(); still does not work, the returned list of SYS_IDs is not in "(", ")". I'm not sure if this is possible. Any ideas?
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 08:55 AM