hide subcategory dropdown that is dependent on channel and category.

Deepanshi1
Mega Guru

hi i have one case form. when i select integration as channel and account payable as category i need to hide one option from subcategory dropdown. how can i do it?

1 ACCEPTED SOLUTION

Can you confirm that "account_payable" is the actual value of that category and that "integration" is the actual value of that channel name?

View solution in original post

9 REPLIES 9

hi it is working for onload but not onchange

Can you please take a screenshot of your onLoad script? 

 

In what way is it not working?

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
    if (newValue == "integration" && g_form.getValue("category") == "account_payable") {
        g_form.removeOption('subcategory',' 40');
    }
}

Can you confirm that "account_payable" is the actual value of that category and that "integration" is the actual value of that channel name?

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
    if (newValue == '4') {
        alert('Deepanshi');
        g_form.removeOption('subcategory','40');
    }
}
 
alert is displaying but subcategory is not getting removed.