OnChange Client script

KS13
Tera Contributor
Hi,
Hoping someone can help with an onChange catalog lient script. 
I have a reference field 'app_mne' that references the Business App table in ServiceNow.
I have another single line field 'LOB' which needs to auto-populate from the above table that contains a field  'Abc_can' on the table. 
 
Any help is appreciated. 
Thanks
 

 

2 ACCEPTED SOLUTIONS

Danish Bhairag2
Tera Sage
Tera Sage

Hi @KS13 ,

 

Please try the autopopulate functionality in servicenow where u can just do this work without using a single code. 

Autopopulate feature works from Utah version.

 

Please check this link for detailed steps

https://www.servicenow.com/community/developer-articles/auto-populate-a-variable-based-on-a-referenc...

 

Thanks,

Danish

 

View solution in original post

Community Alums
Not applicable

you cant have cat.variable/field name having upper case letters in the "system" name.Also,not best idea using catalog client script when you can use "auto populate" -super easy to use and mega fast performance wise.

 

View solution in original post

7 REPLIES 7

@KS13 : Can you share the screenshot of the script and the configuration. Make sure that you set the field name correctly on the on-change client script.

Community Alums
Not applicable

you cant have cat.variable/field name having upper case letters in the "system" name.Also,not best idea using catalog client script when you can use "auto populate" -super easy to use and mega fast performance wise.

 

Amit Verma
Kilo Patron
Kilo Patron

Hi @KS13 

 

Just to be clear with the requirement, you want to auto-populate LOB field on change of app_mne field provided the value of app_mne field changes to 'Abc_can' ?

 

If yes, what is the value you want to set to 'LOB' field ?

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.