How to get a report that brings info about users who have tasks assigned to them with certain status

Erlan01
Tera Expert

I need to create a report using information from the sys_user table, but I also need information from sc_task, as the report needs to bring me all the users from certain groups who have tasks assigned to them and have a certain status. For example: Joe is from the accounting group and has 3 tasks assigned to him, one as work in progress, and the other two as assigned. If my report is filtered to only include users from the IT group who have tasks assigned to them with a status of closed complete or closed incomplete, Joe should not appear in this report.

1 ACCEPTED SOLUTION

Erlan01
Tera Expert

The solution I found was to create a Script include client callable, accessible from all application scopes that get through a GlideRecord on sys_user_grmemberall the users from the groups I needed, and through another glideRecord, this time on sc_task, filter by scTask status, what I got from the first GlideRecord. Then in the filter report, I put the follow condition - (field )sys Id --- (operator) is one of --- (value) javascript: new API(script include) Name().functionName()

Erlan01_0-1702483413820.png

 

View solution in original post

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Erlan01 

LearnNGrowAtul_0-1702300773488.pngLearnNGrowAtul_1-1702300834671.png

Use the operation is Not

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

I've actually tried using this method, but there are two problems.
The first is that there is a lot of data to group by assigned to, which is what I would need. When I do this "group by", the widget doesn't load.
The second problem is that when I do the report like this, it will bring me the sctasks that have the status defined in the filter, for example, if the following condition is in the filter (status is not working in progress) it will not bring sctasks with this status(work in progress), but my need is for users and not for sctasks.
So, following the example filter that I mentioned, it can bring users who have sctask as work in progress as it will only bring sctasks that are not as work in progress, but this does not mean that users who come in this report with the previously mentioned filter will not have sctasks with the status work in progress.

AndersBGS
Tera Patron
Tera Patron

Hi @Erlan01 

 

Why not just create the report based on the sc_task table? You can from here dot-walk to the sys_user or sys_user _group if needed. You also have the possibility to build simple operators conditions as below:

AndersBGS_0-1702365436370.png

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

best regards

Anders

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

What I need is an availability report, that is, I need to somehow bring all USERS from a certain assignment group that only have sctask that have a status of closed complete, or incomplete, because this way they will be available, and it is not possible to do this just with the sc_task table, considering that if I do, for example: a "status is closed complete" filter, it will only bring me the sc_tasks that are in the closed complete status, but that does not mean that sys_users that are assigned to these records do not have other sc_tasks with different statuses.