Ui policies are not working properly on catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 04:54 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 05:07 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 05:15 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 05:31 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 05:19 AM
Try consolidating your UI Policies to reduce duplicate logic.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 05:23 AM
for each ui policy I have applied different condition