Order Guide Variable Set Client Script stops working when UI policies are set to Reverse if False

joymorales
Giga Guru

Hi Team.

I have a variable set for an onboarding order guide with UI policies to show variables based on a specific value on another variable, e.g., if computer needed = Yes, then make computer type variable visible, etc. The variable set also has a client script that on the Order Guide process, it hides the variables set variables from each of the catalog items listed in the "Choose Options" section.

The client script works correctly if the UI policies that show variables based on a value on another variable is set to "Reverse if False" = false. When I change the "Reverse if False" to "true", the UI policies work correctly on the variable set, but the script stops working on the catalog items listed in the "Choose Options" in the order guide.

I changed the Order of each of them (e.g., 100, 200, etc.) to see if it would fix the issue, but it did not.

Attached are the screenshots of the client script and the UI policies. (NOTE: The UI policies for setting variables as "read-only" are working fine.)

Any suggestions on what I can do to have the script and the UI policies work together will be greatly appreciated.

Thanks.

1 ACCEPTED SOLUTION

Tom Sienkiewicz
Mega Sage

Hard to say exactly what's happening, but one thing to double check is - UI Policies always execute after the Client Scripts. So you might want to see if perhaps there is a UI Policy which overrides what your CS is trying to do.

Look for all the UI Policies with onLoad selected and check if one of them is messing up the logic, perhaps by either setting the display of that field to true or making the field mandatory.

If nothing pops up, I would also double check browser console logs, to see if there are any errors...

View solution in original post

2 REPLIES 2

Tom Sienkiewicz
Mega Sage

Hard to say exactly what's happening, but one thing to double check is - UI Policies always execute after the Client Scripts. So you might want to see if perhaps there is a UI Policy which overrides what your CS is trying to do.

Look for all the UI Policies with onLoad selected and check if one of them is messing up the logic, perhaps by either setting the display of that field to true or making the field mandatory.

If nothing pops up, I would also double check browser console logs, to see if there are any errors...

joymorales
Giga Guru

Hi Tomasz:

Thanks so much for your response and information.  I did what you suggested and it led me to where the issue was:  Two of the variables that I am using in two of the UI policies were set to Mandatory on the set.  So, as you mentioned, these were messing up the logic.  I knew this and it's a bummer that I missed this or didn't think to check the variables on the Variables tab. I changed the Mandatory attribute on the variables to False, changed the Reverse if False option to True on the UI policies, tested and issue is now resolved.

Thank you again.  Greatly appreciate your help!