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.

clearValue() is not working in ClientScript

venkatrajesh
Tera Expert

Hi All,

code in client Script:

function onChange(control, oldValue, newValue, isLoading) {

   

find_real_file.png

clearValue is not working so i have used   g_form.setValue('assigned_to','');

may i know why clearvalue() is not working?

6 REPLIES 6

wbrown1
Mega Contributor

Did you ever get a resolution to this? If not try this.

 

g_form.clearValue('assigned_to'); return;

SN27
Giga Expert

Hi there,

write your 'clearValue()' code in onLoad not in onChange okay.

That means above the return and below the if condition in onChange code .

it may works for you.