Automatically display related information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi experts,
We have a service form with a field that queries the assets in the alm_asset table (asset tag). How can we display associated asset information once the user selects the asset in other fields (invoice, company, contract, etc.)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Diana Yazmin ,
You could do it by an OnChange Client script. But I could also ask the question, why at all show the fields on the form if the user shouldn't fill them out. Isn't that?
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi,
To confirm that asset selected is the correct to created request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I have replied it here: https://www.servicenow.com/community/itsm-forum/automatically-display-related-information/td-p/34519...
You can automatically display related asset information on a form once a user selects an asset (like asset tag) by writing a client script that reacts to the asset reference field change, uses g_form.getReference().....to fetch the selected asset’s record from the alm_asset/alm_hardware table, and then populates your other fields (invoice, company, contract, etc......) with the corresponding values so they appear right away on the form......by creating an onChange client script on the asset field that retrieves the referenced asset details and calls g_form.setValue() on the target fields with the data you want displayed.......
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Technical Consultant - Rising Star/Class of Legends 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
is that field on form a reference to asset table?
if yes then you can use onChange client script to grab the other fields and populate
what did you start with and where are you stuck?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader