Regarding autopopulation of data upon select one data lookup field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:25 AM
Hi Team,
I would like to auto populate some fields based on selection of one data lookup field.
Here select the cmdb application is a datalookup field and it is referencing to cmdb_ci_appl table.
I want to auto populate below fields upon selection of any application from this "select the cmdb application" field.
1. application status
2. application short name
3. application long name
4. application owner
5. applcation prime
6. vp
7. deprovisioning servicenow queue name (support group)
8. sox
Could anyone please help me with code , as i am new to this and a beginner.
please leave more information field as this is the user field has to be filled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:59 AM
Hello @Gudu ,
The easy way without scripting would be to use Auto Populate Feature in the Catalog item. But, for this you need to change the Lookup field type to Reference field type.
The below article will provide you step by step approach.
https://www.servicenow.com/community/developer-articles/auto-populate-reference-data-in-service-cata...
If you want to go with Lookup field, then you need to create onChange Client script on the Catalog item and call GlidAjax ScriptInclude to fill the values.
The below link provides you to know how to write GlideAjax.
https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet/ta-p/2312430
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 04:25 AM
It will be helpful to me if anyone will writhe down the code for me as this is confusing me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 04:51 AM
you can use auto populate feature which came from Utah onwards and no scripting required
Auto-populate a variable based on a reference type variable (Utah)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 05:50 AM
Hi,
First create a client callable Script include as below, replace the actual table and fields below: