Service catalog checkbox visibility

DB1
Tera Contributor

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)

DB1_0-1686076728995.png

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.

DB1_1-1686076957023.png

 

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 

 

5 REPLIES 5

Prinssi
Mega Sage

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.

DB1
Tera Contributor

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:

 

DB1_0-1686082141791.png

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

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

DB1
Tera Contributor

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