Historical Incident data for specific Assignment group

kumar22
Tera Contributor

Hi Team, 

How can I fetch incidents that were handled by Network Assignment users, meaning that at some point in the incident’s lifecycle it was assigned to a Network user? I tried creating a database view for this, but I’m not able to retrieve the data. Has anyone achieved this before and can guide me?

OrderTableVariable prefixWhere clause
100metric_instancemi 
200metric_definitionmdmd.name = mi.definition && mi.definition = 'Assigned to duration' && md.table = 'incident'
300incidentincinc.sys_id = mi.id
400sys_useruu.sys_id = mi.value
500sys_user_grmembergrmgrm.user = u.sys_id && grm.group = 'd625dccec0a8016700a222a0f7900d06'

 

Thanks in advance!

7 REPLIES 7

Hi @Dr Atul G- LNG , I am not sure, i dont get any error as well. 
Also I am trying with History and History line tables but same issue again, not data is fetching in the DB views.

OrderTableVariable prefixViewWhere clause
100sys_history_linehlu_servicedesk_handled_incidents_14aughl.field = 'assigned_to'
200sys_history_sethsu_servicedesk_handled_incidents_14aughs.sys_id = hl.set
300incidentincu_servicedesk_handled_incidents_14auginc.sys_id = hs.id
400sys_useruu_servicedesk_handled_incidents_14augu.sys_id = hl.new
500sys_user_grmembergrmu_servicedesk_handled_incidents_14auggrm.user = u.sys_id & grm.group = 'd625dccec0a8016700a222a0f7900d06'

Hi @kumar22 

Let’s break this into pieces—don’t join all tables in one go. Pick the first two tables and see if you’re getting results. Also, to confirm the results are there, you can check if the data exists in the list view.

*************************************************************************************************************
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]

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

Bhuvan
Kilo Patron

@kumar22 

 

You can track more information of incident 'assignment group' field using sys_history_set and sys_history_line tables. You can create a report using these tables to show incidents where 'assignment group' was 'Network' and 'assigned to' was not empty.

Bhuvan_0-1755162340217.png

Bhuvan_1-1755162340213.png

Thanks,

Bhuvan