Display Value of State Field in report from sys_audit table

Ankita34
Giga Contributor

We are trying to configure history report on alm_asset table using sys_Audit table for the state field(install_status) where values are 1,2,3, 4 etc in sys audit table fields old value and new value. We need to display if old value = 1 then display customized attribute = "In use" or if oldvalue = 7 then display customized attribute = "In Maintainence"

 

Pls suggest.

5 REPLIES 5

Anil Lande
Kilo Patron

Hi,

Please check if you can use sys_history_line table, it provide both label and values.

find_real_file.png

 

Thanks,

Anil Lande

No we cannot use sys_history_line table as it doesnt capture each and every change done for an asset like sys_audit table.

Daniel Slocum
ServiceNow Employee

Would you be able to leverage auditing on the related CI's hardware_status attribute?  That value is stored as a text value not a numeric.  You'd want to validate the synchronization rules between the Asset and the CI are setting the values per your business needs, but otherwise, this could be a solution for you.

 

Mahfuz Qureshi1
Tera Contributor

@Ankita34 did you got any solution as I also have to buil a report on sys_audit table for capturing old & new value for install_status field?