How to hide variables using decision Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 10:21 PM - edited 09-23-2024 10:40 PM
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)
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 10:51 PM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 11:02 PM
Thanks John, i tried it, but not working, though there are no errors but somehow onchange script is not working. Any further suggestions pls.