The CreatorCon Call for Content is officially open! Get started here.

Ui policies are not working properly on catalog item

Ashwini Jadhao
Giga Guru

Hi,

I have applied 7 ui policies on 105 variables and also applied proper conditions and order for the ui policies.

But whenever I have reload the form then only UI policies are working properly. If I change the condition without reloading the form then it is not working as expected.

What should be the solution on it?

 

13 REPLIES 13

Barbara L - Gli
Tera Guru

Are there variables that are being controlled by more than one of the UI Policies? If there are Catalog UI Policy Actions for the same variable under more than 1 UI Policy that often will cause the UI Policies not to function as expected, since more than 1 UI Policy is trying to act on the same variable.

Some other things to check on each UI Policy:

That on each UI Policy "Applies on a Catalog Item view" checkbox is checked, if that's where you're testing them

"Reverse if false" is checked if applicable

"On load" is checked if applicable

Also see if there are any client scripts that may be conflicting as well.

There are 6 ui policies applied on same variable.

"Applies on a Catalog Item view" checkbox is checked, 

"Reverse if false" is set as false

"On load" is checked .

and there is no client script applied on  display functionality.

 

 

If 6 UI Policies apply to the same variable, that will be the issue. Even with "Reverse if false" set to false, likely more than 1 of those 6 UI Policies are trying to act on that one variable at once, causing conflicts.

You're going to want to condense your conditions to only have 1 UI Policy, try using "OR clauses" in your conditions instead of separate policies.

If you're controlling more than one aspect of the variable, like it being visible vs. read-only, then you could control those in separate UI Policies if they have separate conditions, if you "Leave alone" say, the visibility under the Policy meant to control it being read-only.

If you want help condensing the policies you can post the conditions here, as well as the actions that are supposed to take place

The SN Nerd
Giga Sage
Giga Sage

Try consolidating your UI Policies to reduce duplicate logic.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

for each ui policy I have applied different condition