How to create an audit list with field changes and work notes

Michael131
Giga Expert

To be able to audit key field changes in our projects, we created this process. When users make a change to a key field, they also create a work note explaining why and then save the changes. Saving both the field change and the work note gives them the same timestamp and keeps the two together in the Activities list.

We want to provide management with a filterable listview grouped by portfolios, programs, and projects so they can quickly see the changes they are interested in reviewing. Often the timing of monthly status reports are not adequate, and this would fill that gap.

I know to get this list to include portfolio, program, project, field name, previous state, current state, and work notes fields, it requires access to task, sys_audit and maybe other tables.

We will find a partner to create this list. I would appreciate any information about whether this is doable, so I can let management know if this is something we can provide them.

Thank you.

  find_real_file.png

1 ACCEPTED SOLUTION

Manish Vinayak1
Tera Guru

Hi Michael,

You can get those details from sys_audit table, as well as from the sys_history_line table. You can directly see those details from sys_history_line table. Here's an example filter which I applied to see the field changes for incident table:

Table: sys_history_line

Filter: 

find_real_file.png

The above filter is considering only work_notes and state fields for incident table.

Result:

find_real_file.png

 

As shown above, you can include "New" and "Old" values to see what change was made, and ordering it by update time can show you what comment was added with the field change. In my example, I can see what comment was made when someone changed the "state". You can also have the "User Name" value to see who updated the record.

I think that table can be utilized straightaway, or you could have a custom report made to share the details with the management.

(Note: sys_history_line table might not appear in the reporting module directly, I navigated using sys_history_line.LIST from the navigation panel. In order to do reporting on system tables, you need to add those tables to a property. Here is the documentation on that: https://docs.servicenow.com/bundle/madrid-performance-analytics-and-reporting/page/use/reporting/con...)

Hope this helps!

Cheers,

Manish

View solution in original post

6 REPLIES 6

Manish Vinayak1
Tera Guru

Hi Michael,

You can get those details from sys_audit table, as well as from the sys_history_line table. You can directly see those details from sys_history_line table. Here's an example filter which I applied to see the field changes for incident table:

Table: sys_history_line

Filter: 

find_real_file.png

The above filter is considering only work_notes and state fields for incident table.

Result:

find_real_file.png

 

As shown above, you can include "New" and "Old" values to see what change was made, and ordering it by update time can show you what comment was added with the field change. In my example, I can see what comment was made when someone changed the "state". You can also have the "User Name" value to see who updated the record.

I think that table can be utilized straightaway, or you could have a custom report made to share the details with the management.

(Note: sys_history_line table might not appear in the reporting module directly, I navigated using sys_history_line.LIST from the navigation panel. In order to do reporting on system tables, you need to add those tables to a property. Here is the documentation on that: https://docs.servicenow.com/bundle/madrid-performance-analytics-and-reporting/page/use/reporting/con...)

Hope this helps!

Cheers,

Manish

Hi.  This was unbelievably helpful to me, so thank you!  I have a follow up.  As an admin I can create these queries, but without the admin role others cannot.  Next I decided to create a report, however I cannot seem to reference the sys_history_line table, which makes no sense to me.  Is there a restriction on creating reports using the sys_history_line table?  Doesn't sound right, probably user error.  Thanks.

And I just reread the rest of your post and there's the answer to the question I just asked!  Very cool

Glad that it helped 🙂

Cheers,

Manish