Service catalog checkbox visibility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 11:46 AM
Hi all,
I have the below requirement and need help to achieve the same. TIA
1. There is a select box with 5 options.(Option A,B,C,D,E)
2. When Option A is selected it should display 2 Mandatory Checkboxes (refer below image)
3. Requirement: Cat item should display 2 checkboxes when Option A is selected. However, when checkbox 1 is selected then Checkbox2 should disappear similarly when checkbox 2 is selected checkbox1 should disappear.
The variables I have
1. Select box
2. I created 2 separate variable sets which holds the two different checkboxes separate.
Variable set 1 - Checkbox1
Variable set 2 - Checkbox 2
3. I created a catalog ui policy to display the 2 checkboxes when option A is selected.
However need help with Point#3 Requirement
TIA
@Manmohan K @Ankur Bawiskar @Mark Roethof @Ratnakar7 @Daniel Pettet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 12:04 PM - edited 06-06-2023 12:05 PM
Hi DB,
You can accomplish requirement 3 by adding two UI policies (make sure they are higher order than the UI policy that displays them in the first place).
UI Policy 1 - When Selectbox is Category A AND Checkbox 1 is true, UI Action: set Checkbox 2 to not visible, and manadatory is false.
UI Policy 2 - When Selectbox is Category A AND Checkbox 2 is true, UI Action: set Checkbox 1 to not visible, and manadatory is false.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 01:11 PM
Hi thanks for the quick reply.
The above suggestion works fine with hiding the checkbox when either of one is checked. However I just mentioned one hierarchy above this validation. I ended up with a problem there
Actually the hierarchy is as follows:
1. Select box 1 = Option A
2. Select box 2 = Option A
3. Select box 3 = Option A
4. Only when above 3 conditions are met it should show the 2 checkboxes
Now, with the 2 new catalog UI policies that I had to create the 2 checkboxes are being displayed everywhere. It is not meeting the above 3 condition where it has to be Option A in all the select boxes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 03:52 PM
Got it. In that case, you would update the conditions in your UI Policies.
UI Policy 1 (displaying the checkboxes) conditions should be:
- Select box 1 is Option A, AND
- Select box 2 is Option A, AND
- Select box 3 is Option A
UI Policy 2 (hiding checkbox 2) conditions should be:
- Select box 1 is Option A, AND
- Select box 2 is Option A, AND
- Select box 3 is Option A, AND
- Checkbox 1 is true
UI Policy 3 (hiding checkbox 1) conditions should be:
- Select box 1 is Option A, AND
- Select box 2 is Option A, AND
- Select box 3 is Option A, AND
- Checkbox 2 is true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 06:08 PM - edited 06-06-2023 06:14 PM
Hi I tried.. Still not working. It shows up on the form onload without any selections made.
I also tried the following.
1. UI policy 1 - has "Reverse if false" = true/Onload = true
2. UI policy 2 - to show checkbox 1 "Reverse if false" = false/Onload = true
3. UI policy 2 - to show checkbox 2 "Reverse if false" = false/Onload = true
I noticed the 2 checkboxes not visible on load however if checkbox1 is selected checkbox2 disappears and does not come back if checkbox1 is unselected. Hope I am not confusing