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

Did you check weather if loop is executing or not?


Hi Saranya,




I tried same on my instance and below part of your code is working fine on my instance. I applied it on change of assignment group. You can check if the sysid of the group used is correct or not as your code looks fine to me.


You can put alert message in your if loop and check if the code is executing if statement or not.



var val = g_form.getValue('assignment_group');



  if(val=='c98c447ddb4d2e0006a6f9b9af961928')//EUC_Client_Support


  {


  g_form.setValue('u_sla_category',''); //working individually


  g_form.clearValue('u_sla_category'); //working individually


  g_form.clearOptions('u_sla_category'); //working individually


}



Regards,


Anjali