In sys_audit (history) table all the data is not visible only few records were visible at a time

AshwiniSawant
Tera Contributor

Hello @Uncle Rob ,

 

We have below requirement -

1. We have our own module for Security Incidents and user want to calculate the below -

2. There is automation due to which tickets got assigned to robot and then team members get those ticket assigned to themselves (reassignment).

3. User want to fetch the data like which assignee have reassigned that ticket in how much time since its open. i'e update time of the ticket.

4. When we try to check data in audit history table, all required data is not visible , can you please help me why all the required data is not fetched at the same time. Only few records were visible at a time, and we need to find data by searching individuals name but overall its doesn't showing all the data. 

Below is the result column we want -

 

AshwiniSawant_0-1737132710586.png

 

Thank you in advance !

 

10 REPLIES 10

Uncle Rob
Kilo Patron

I wouldn't do automation or reporting in sys_audit.
I'd run a metric on assigned_to field.  

Thanks @Uncle Rob , for your response. Yes, I just wanted to know the reason, Why all records are not visible in the sys_audit table though the type of record is Audit. When I try to search it one by one then some of the records appears but not all. Any reason?

If we are able to see all the associated records in above table then our issue will be resolved. 

Again, you DO NOT want to report on sys_audit like this.
Metric Definition / Metric Instance can solve this for you.

Ankur Bawiskar
Tera Patron
Tera Patron

@AshwiniSawant 

Why not use metrics for that?

If the ticket update happens with some script using setWorkflow(false) then it doesn't get recorded in audit/history table

If my response helped please mark it correct and close the thread so that it benefits future readers.

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