Problem with UI Policy/Requested Items

matthew_magee1
Giga Guru

We have several catalog items.

There are also UI Policies associated w/ some of these items, which hide/show fields depending on certain values selected in other fields. This works GREAT!

We also have the box selected 'Applies to requested items' on the UI policies

 

When an item is ordered and we look at the requested item, the requested item form shows the values we selected. However, it is indicating that there are some required fields missing values (which were hidden by the UI Policy)!

 

So in a nutshell, the form has hidden fields, which are now showing as required in the requested item.

 

Any thoughts as to why this might be happening?

 

Hope this makes sense

1 ACCEPTED SOLUTION

AlexandreHerrer
Kilo Expert

Hi Matthew,



It's likely that you've variables set as mandatory in the "dictionary" (on the variable itself) and then hidden by the UI Policies.



This should be absolutely avoided, as best practice, never set a variable mandatory at the "dictionary level" (= in the variable form there is a check box to set it mandatory), just set it mandatory using your UI policy.



What you should do on my view: Check your variables and see if one is mandatory, uncheck the mandatory check box of the variable and set it mandatory when it should via UI Policy.



Best Regards



Alexandre Herrero


View solution in original post

3 REPLIES 3

AlexandreHerrer
Kilo Expert

Hi Matthew,



It's likely that you've variables set as mandatory in the "dictionary" (on the variable itself) and then hidden by the UI Policies.



This should be absolutely avoided, as best practice, never set a variable mandatory at the "dictionary level" (= in the variable form there is a check box to set it mandatory), just set it mandatory using your UI policy.



What you should do on my view: Check your variables and see if one is mandatory, uncheck the mandatory check box of the variable and set it mandatory when it should via UI Policy.



Best Regards



Alexandre Herrero


Hi Matthew,



1)As mentioned by Alexander you can check in the dictionary of Variables whether they are made mandatory or not.


If not from there then you can check Catalog Client Scripts/UI Policies where they are made Mandatory and hidden.



2)Also if you are not able to find any scripts /UI Policies then there may be possibility on Request Item table on,load client scripts where it is made mandatory.



I think   in step 1 only you should get it.




Also I think it will not allow to hide Mandatory variables if no value is present in it.Script will not run



Thanks,


Darshan


matthew_magee1
Giga Guru

Thanks Alexandre for the quick response. As I was writing my question, I thought about the same thing. Sure enough,the variable was set to mandatory. In turn, we found others that were just like this scenario. Easy mistake for first-timers like myself-


Take care-


Matthew