Automatically display related information

Diana Yazmin
Tera Contributor

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.)?

DianaYazmin_0-1766013734258.png

 

Thank you

2 REPLIES 2

kaushal_snow
Giga Sage

@Diana Yazmin ,

 

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.

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Technical Consultant - Rising Star/Class of Legends 2025

Ankur Bawiskar
Tera Patron
Tera Patron

@Diana Yazmin 

seems you posted this question again.

you already have responses to your old question

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