How to find Updated, Created, Resolved and Updated incidents count by Inactive Users in system

Abdul333
Tera Contributor

Hello All,

 

In Our system 25k+ Users are inactive, we need find the created, updated, resolved and closed incidents by each inactive user.

 

Please help to provide the script to find tickets by inactive users by state.

 

@Ankur Bawiskar @Community Alums 

 

 

Thank you,

Abdul

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Abdul333 

you can have normal filter condition on the incident table

what did you start with?

Do you have list of those users? 25k + is a huge number.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  Yes I have the list from the user table with this query(active!=true^sourceISEMPTY) but need to know how we can fetch the cases count by each inactive user.

 

we want to check the cases created by inactive users if those are less no. so that we will delete those accounts from the system.

 

please provide script to check those results.

 

Thank you,

Abdul

@Abdul333 

you need to design script for 10-15 inactive users and then you can enhance it further for more users

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Arun_S1
Tera Guru
Tera Guru

@Abdul333 you don't need a script to get this data, you can get this data by adding filters in the incident list.

 

In the incident list view add a filter by selecting "caller==> User Fields", and selecting active field is false, this will give you the list of incidents where the caller is inactive.

 

Similarly you can do the same for other fields like updated, resolved & closed.

 

If you are unable to put the filter in the list, please use the below URL (replace your instance name)

 

https://dev12345.service-now.com/incident_list.do?sysparm_query=caller_id.active%3Dfalse&sysparm_fir... 

 

Please mark the appropriate response as correct answer and helpful.