Reporting on Catalog Tasks Opened by "Me" Assigned to A Group That is Not One of "Mine"

Kieron Jones
Giga Expert

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!

2 ACCEPTED SOLUTIONS

Mike_R
Kilo Patron
Kilo Patron

try this

instanceName.service-now.com/sc_task_list.do?sysparm_query=assignment_group!%3Djavascript%3Ags.getUser().getMyGroups()&sysparm_view=

 

Mike_R_0-1669653929523.png

 

View solution in original post

Set it up like this (use is not)

 

Mike_R_0-1669827307133.png

 

 

View solution in original post

5 REPLIES 5

Mike_R
Kilo Patron
Kilo Patron

try this

instanceName.service-now.com/sc_task_list.do?sysparm_query=assignment_group!%3Djavascript%3Ags.getUser().getMyGroups()&sysparm_view=

 

Mike_R_0-1669653929523.png

 

Kieron Jones
Giga Expert

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!

Kieron Jones
Giga Expert

@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

Set it up like this (use is not)

 

Mike_R_0-1669827307133.png