How to Display Recent Record Changes with Readable Old/New Values in UI Builder Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi Community,
I am working on a custom page in ServiceNow UI Builder for Asset Management Workspace. The requirement is to display the recent changes made to a selected Hardware Asset (alm_hardware) record.
I am retrieving audit records from the sys_audit table using the selected asset's sys_id, with the intention of displaying the following details:
Field name
Old value
New value
Changed by
Change date/time
However, I am facing an issue with the values returned by sys_audit. Some reference fields return backend sys_id values instead of readable display values, and some choice fields return internal values rather than their labels.
For example:
assigned_to, location, and stockroom may return reference sys_id values.
install_status may return internal choice values such as 1 or 6.
Other fields, such as life_cycle_stage_status, may already return readable labels.
What is the recommended way to display readable old and new values from sys_audit in a custom UI Builder page?
Can reference values and choice labels be resolved using UI Builder data resources or Client Scripts?
Can a Client Script invoke a client-callable Script Include to process the audit records and return formatted values? If so, what is the supported approach in Workspace?
Is there a recommended alternative that avoids Business Rules and changes to the existing alm_hardware table?
The solution should work in Asset Management Workspace and display the recent changes for the asset selected through a Typeahead component.
Any guidance or examples would be appreciated.
Thank you!
