UI Policy to hide/Show Checkbox

travuswarren
Giga Contributor

Hello all,

Has anyone had any issues creating a UI Policy to hide/show a checkBox field for a service catalog item?   I will document   my UI Policy below.

Condition:

test_selectbox = new   or

test_selectbox = old

Catalog UI Policy Actions

test_checkbox: Mandatory: Leave alone Read-Only:Leave alone Visible: True

test_reference field: Mandatory: True Read-Only:True Visible: True

When the test_selectbox condition matches, the test_reference field is visible but the test_checkBox remains not visible.

What is weird is that the UI policy works correctly when I created an additional test checkBox and removed both order values.   This creates both checkBoxs on the top of the form which is not intended and only used for testing.

find_real_file.png

Thanks again

1 ACCEPTED SOLUTION

Hi William,



I actually was able to get my issue fixed with some assistance.   I had to wrap my checkbox with two containers(container start & container end).   Try to wrap your checkboxes in additional containers.   Hopefully this helps.


View solution in original post

27 REPLIES 27

Ravio has a good point, there was a known problem with UI policies and checkboxes which is solved in patch 4. See Release notes: Geneva Patch 4 and search for PRB660782.



My demo instance from ServiceNow is on Geneva (patch3_hotfix2) and I am finding this is working for me without an issue. Below are the steps I took to attempt to reproduce your issue ricksam. Look this over and let me know if you're still having issues...



My variables, showing the checkbox located inside the container.


find_real_file.png




The catalog UI policy I have set up


find_real_file.png



And below is a quick video I took, because in times like this you need to see action - still images aren't that great in this instance. For my particular case, I have to move out of the field for the UI policy to take effect. If I just type something in, the UI policy doesn't react until the field state changes.



Hi William,



I tried deleting formatter from Catalog UI Policy action. Even that didn't help.. Please help.


Ravish Shetty
Tera Guru

This issue is fixed in Geneva patch 4 and all patches and hotfixes after that.