Nee to create report when fields are updated

Chiranjeevi K
Tera Expert

Hello All, 

We have a requirement to create a report when the fields are updated on the record with old value, new value and updated by details and we have created the database view of our two tables (contract table & Sys_audit table) which shows the all available records of the contract with old value, new value and updated by details instead of updated records

we are looking to pull only the records that are updated as per our mentioned time period over the filter in the report table.


I have read somewhere e that sys_audit table will create records only when we open from the history of the record which is limiting us from pulling the report or there is something to do with where clause on the database view.

looking forward for the help with your expertise to achieve this, thanks in advance!!

5 REPLIES 5

Chiranjeevi K
Tera Expert

Ankur Bawiskar - Can you please help on this request

SumanthDosapati
Mega Sage

@Chiranjeevi K 

It is not recommended to run reports on audit tables. Making database view will make it much slower too.

Did you try Metrics instead?

Create a record in metric_definition on your table and then report on metric_instance table.

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth

 

Ankur Bawiskar
Tera Patron

@Chiranjeevi K 

you can use metrics for this

Identify previous and current values of a field using metric definition 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Chiranjeevi K
Tera Expert

@SumanthDosapati @Ankur Bawiskar  Thanks for the response, i have created metric on the table with field as contract administer but records are not being created under metrics even post updating the field on the contract record