Client Script OnChange - Clear field if another one changes

DesiraeSaysanav
Mega Guru

I would like to create an OnChange Client Script for the Incident form.

When the location changes I need the Configuration Item to be cleared out, this has to work before a save/update is done.

Can someone help me write this as I am not good with scripting. TIA!

1 ACCEPTED SOLUTION

kristenankeny
Tera Guru

In the script field on an onChange client script, you just need to do:



g_form.clearValue('cmdb_ci');


View solution in original post

11 REPLIES 11

Correct, All i did was modify the script. It is doing it on initial save as well. Is there a way to script and say "get current value and if that value changes then clear the CI" ?


Do you have any other scripts running on the form? You can also right click on the CI field and select "Watch". This should open the debugger at the bottom of the screen. Then, recreate your issue and see what scripts might be running and changing it.