- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hello guys,
I got stuck with the catalog client script.
I have var set with specific variable 1 which i want to be shown on catalog item.
However visiblity of this variable depends on select box which is in var set 2.
UI policy in catalog item didnt work, i guess it should be catalog client script.
I create onChange and Variable name is select box from var set 2.
In script I simply wrote if selct box is value mychoice, then field special variable is visible.
It didnt work. Iwonder if i have to create a script in var set 2?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @FotinaG ,
Try below script:
function onChange(control, oldValue, newValue, isLoading) { if (isLoading) { return; } if (newValue == 'mychoice') { g_form.setVisible('special_variable', true); } else { g_form.setVisible('special_variable', false); } }
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @FotinaG ,
Try below script:
function onChange(control, oldValue, newValue, isLoading) { if (isLoading) { return; } if (newValue == 'mychoice') { g_form.setVisible('special_variable', true); } else { g_form.setVisible('special_variable', false); } }
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Thank kyou so much! it worked!
