How to hide variables using decision Table

jatin24j242424
Tera Contributor

Hi All, 

 

I have a catalog 'Software'. I have created a decision table on a catalog item, based on which whenever user selects the catalog & enters company code Acer, new choice list populates, but remaining variables of the catalog are also populating, that are not required and neither mentioned in the decision table. 

 

Can you please suggest how other variables that are not there in the decision table can be hide, without UI policy. 

 

I have tried using onchange client script on company code, but not working , showing no error. 

 

if(newValue == 'Acer') {

g_form.setDisplay('country', false);

g_form.setDisplay('language', false);

g_form.setDisplay('number', false)

}

 

2 REPLIES 2

Community Alums
Not applicable

You could try a catalog client script onChange and have a switch statement that checks the different 'cases' (similar to your decision table) and hides/shows variables based on each case

 

Something like this

switch(newValue)

case 'Acer':

g_form.setDisplay('country', false);

g_form.setDisplay('language', false);

g_form.setDisplay('number', false)

break;

case 'HP':

g_form.setDisplay('country', true);

g_form.setDisplay('language', true);

g_form.setDisplay('number', true)

Thanks John, i tried it, but not working, though there are no errors but somehow onchange script is not working. Any further suggestions pls.