Clear drop down value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 03:13 AM
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
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 03:50 AM
Did you check weather if loop is executing or not?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 04:13 AM
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