Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

On submit

vikasgc1999
Tera Expert

Get value taking null value in on change script but in on su

bmit taking sys id

13 REPLIES 13

Sandeep Rajput
Tera Patron
Tera Patron

@vikasgc1999 Could you please post your onChange script here.

 

@vikasgc1999 The sys_id of the app_owner field is still empty on onSubmit script too. Your if condition is not executing in onSubmit because of the second part g_form.getValue('app_owner')=='(empty)'. 

 

I recommend you to add an alert on getReference method callback in your onChange and see if any value is returned for the selected application name.

If i put alert it shows sys id 

@Sandeep Rajput