Record producer not showing all the options when options are selected backwards, Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2022 04:07 AM
Hello, I am creating a record producer. The first question is a select box (drop down menu with 10 choices). The questions are ordered from 001 - 010. Based on the selection other questions become visible (done via UI policy). The other questions, there are 3 which are used with all the choices in the 10. To clarify, for example
select box questions: option 1, option 2, option 3, option 4 > select option 1 > que 1, que 2, que 3 become visible.
select box questions: option 1, option 2, option 3, option 4 > select option 2 > que 1, que 2, que 4 become visible.
select box questions: option 1, option 2, option 3, option 4 > select option 3 > que 1, que 2, que 5 and que 6 become visible.
Problem is when I try it out and I select the options going down in order, I can see all the relevant questions becoming visible in the right order, but when I get to the end (option 3) and I select the questions going back wards (reselect option 2), the 3 questions which are used in all the options don't become visible, only the last question (que 4) which are only used in that option are shown. Why is this happening? How to fix this.
Earlier even going down the order in select box certain questions would not be visible, so I put an order on the UI policy and that has resolved this issue, but going backwards the issue still exists. Please help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2022 06:10 AM
This is a little tuff to figure out , since multiple UI policies are working on single variable. I will suggest to write a onchange catalog client script.
for example :
if(newValue == "options1")
{
g_form.setVisible("variable2",true); // question to be shown
g_form.setVisible("variable3",true); // question to be shown
g_form.setVisible("variable4",false); // question to be hidden
}
if(newValue == "options2")
{
g_form.setVisible("variable2",false); // question to be hidden
g_form.setVisible("variable3",false); // question to be hidden
g_form.setVisible("variable4",true); // question to be shown
}
On a selection of one option make setvisible true for those which needed to be shown and the rest should be false. this way you will be able to manage this easily with one script instead of 10 to 15 ui policies.
// syntax of setVasible
g_form.setVisible("variable",boolean);
Please mark helpful, if this solves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 01:30 AM
would I have to do that for all 10 options?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 01:37 AM
yes, if you have 10 choices then you have to do it for all 10. it will be one time effort to do this and still a better option than having 10 or 15 ui policies, having so many ui policies will be a nightmare to maintain or debug if some requirements get changed in future.