When i am writing a client script on NOne option to clear the values its not working.

sushma9
Tera Contributor

I have written On change client script when None Is selected to clear the options but its not working .please find the script below.

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

if (newValue == '  ') {

g_form.clearOptions('which_state_is_impacted');
}

}

10 REPLIES 10

Murthy Ch
Giga Sage

Hi Sushma,

Instead of that I would suggest to use UI policy which is more efficient.

Set the condition like:

Variable name is empty

Write your script in Run script section.

 

 

Thanks,

Murthy

Thanks,
Murthy

May i know why the script is not working here.is there any wrong with the script?

Okie

can you try this:

if (newValue == '') {

g_form.clearOptions('which_state_is_impacted');
}

}

 

Note: Not tested

 

 

Thanks,
Murthy

its not working