Clear drop down value

salu
Mega Guru

Hello,

I want to clear the drop down value.There is a default value generic

On chnange of the assignment group I need to clear the drop down and make mandatory.How it possible?

Both are not working

g_form.setValue('u_sla_category','');

  g_form.clearValue('u_sla_category') ;

Thanks

saranya

11 REPLIES 11

vinitha3
Tera Guru

You can use this code,



g_form.getControl('column_name').options.length = 0


OR


g_form.clearOptions('column_name');



Thanks,


Vinitha.K


Both are not working


Did you see how the dictionary is configured for that category field?


May be you need to remove those bindings and make it entirely custom.



Thanks,


Vinitha.K


This how I did for close code field,



g_form.removeOption('close_code','Solved (Permanently)','Solved (Permanently)',6);



Thanks,


Vinitha.K