Show/Hide fields using UI Policy

tiyasa
Giga Expert

I have a multiple choice variable and need to show/hide different fields based on the value of the Variable. Currently, there are 2 values options. Created the UI policies

Created the UI policies and set the visibility per requirements. The problem is upon switching between these values, it does not toggle at all. It just sits as it would at load.

Originally, I had a client script managing the toggling of scripts, but upon deploying to other environments, encountered an issue with the order or processing the load and change scripts. So I am migrating to UI Policies.

Any suggestions?

Thanks,

~T

1 ACCEPTED SOLUTION

Ah just found the problem. I had one more onChange Client Script there which was clearing the fields when the Variable option was changed. I disabled it and it started working.



Any suggestions on how I can put that feature back?


View solution in original post

7 REPLIES 7

Uncle Rob
Kilo Patron

First thing is to de-activate the scripts.   UI Actions and Client scripts don't play nicely together.



If you already have the client scripts deactivated, then please paste in screenies of your UI Policies.


Yes, the scripts are disabled. Here are the screenshots.



Some notes:-



- All the variables are set to non-mandatory at the variable level.


- The UI Policies are ordered at 100 both.


- I have tried to turn off Reverse if false and on load, one by one etc, and it still doesn't work.



find_real_file.png



find_real_file.png



The second one is:



find_real_file.png



find_real_file.png




Thanks in advance.


Ah just found the problem. I had one more onChange Client Script there which was clearing the fields when the Variable option was changed. I disabled it and it started working.



Any suggestions on how I can put that feature back?


Fixed. I put the clearing of field condition in the run scripts section of the UI Policies.  



Happy Me