Show/Hide Variable Set in Catalog Item

jmiskey
Kilo Sage

We have a Catalog Item that has (among other things), a Multiple Choice field and two Variable Sets.  I want it to work so that initially, neither Variable Set is visible.  Then, in the Multiple Choice field, if the first selection is made, the first Variable Set is shown (and the second is hidden).  Likewise, if the second option in the Multiple Choice field is selected, I want the second Variable Set to be shown (and the first one hidden).

I tried to do this with a Catalog UI Policy, based upon the selection in my Multiple Choice field, but it did not work.  I tried various ways of doing it (choosting to either make the Variable Set visible, or make it hidden), but neither way worked.  How do you get this to work?

Note: Before someone suggests using Containers, and doing Catalog UI Policies on them, that option won't work for us, because within each Variable Set, there is a mix of Mandatory and Non-Mandatory fields, as well as some fields that will be hidden based on the selection of other fields (so I will need to put some Catalog UI Polcies without my Variable Sets too).  We have found that Container don't work well if all the fields within them are not to be treated the same (i.e. all Mandatory).

1 ACCEPTED SOLUTION

OK, we figured it out.  We had to take the "negative" approach rather than the "postitive" one to do it.  So in the first Variable Set, we would need to set up the Catalog Client Script like this:

Catalog Conditions: Field A2 is NOT "Other"

Reverse if False: Checked

Catalog UI Policies Actions:

Variable Name: Field A3

Mandatory: False

Visible: False

Clear the variable value: Checked

 

And do likewise for the other Variable Set.

When set-up like this, it works as intended.

View solution in original post

6 REPLIES 6

I don't see any reason why it should not work.

I don't either, but it doesn't seem to work.  As soon as you try to make any field Mandatory, by a Catalog UI Policy in either the Variable Set or Catalog Item, everything in that Variable Set shows up ALL the time (so the Catalog UI Policy on my Variable Sets is not working, it is being overruled).  See if you can set up my simple example to work.

Its acting like it doesn't seem to like "nested" Catalog UI Policies, i.e. I have Catalog UI Policies on the Catalog Item determining which Variable Set to show, and then I have Catalog UI Policies within my Variables Sets to determine which fields to show (and which fields are mandatory).

To answer your other question, these two Variables Sets will only be used in this one Catalog Item.

OK, we figured it out.  We had to take the "negative" approach rather than the "postitive" one to do it.  So in the first Variable Set, we would need to set up the Catalog Client Script like this:

Catalog Conditions: Field A2 is NOT "Other"

Reverse if False: Checked

Catalog UI Policies Actions:

Variable Name: Field A3

Mandatory: False

Visible: False

Clear the variable value: Checked

 

And do likewise for the other Variable Set.

When set-up like this, it works as intended.