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.

OnChange script on reference field

uma17
Tera Guru

Hi All,

I have an onchange() script on the reference field , which works fine when I change the value of the field, but when I make the field blank by erasing the value, the onChange script wont get called.

So the check if(newValue == "") never gets called.

Thanks,

Uma

1 ACCEPTED SOLUTION

Because it is returning out of the script.   Take out the



|| newValue == ''



and it should work fine.


View solution in original post

7 REPLIES 7

Thank you Mike, I did not notice that.



Thanks


Uma


Hi David,



I hope you have removed the below default condition at beginning of the script already.



Screen Shot 2015-08-28 at 8.54.51 am.JPG


Yes, I was testing with just the newValue=='' condition.