- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I have 3 UI Policies, and each of them contains around 8–9 UI Policy Actions (show/hide and mandatory conditions for variables). But the UI Policies are not working as expected.
I already checked the Order and also tried Reverse if false, but it’s still not working properly.
(It is for catalog item)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I can see your screenshots.
The issue happens because you are using the same variable in multiple UI Policies.
For example, the variable “department” is set to mandatory = true in one policy and mandatory = false in another. This is not correct, because when the request is created, the variable will always follow the first policy, and for other request types it will conflict.
Instead of creating separate UI Policies that contradict each other, you should create a single UI Policy with conditions combined using AND (and/or OR when needed).
This way the logic will be consistent, and the variable will only behave as expected based on the right conditions.
See Allen explanation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rishabh_N
As you are setting 3 Ui policies for the same variable. As per servicenow, "setting the same variable as mandatory in one UI Policy and not mandatory in another" creates a conflict, and ServiceNow will only allow one state at a time, usually whichever UI Policy runs last, or which one is at higher precedence takes effect.
It is recommended to use "AND/OR conditions" in a single UI Policy to define your requirement, as @Rafael Batistot mentioned.
Please go through:
https://www.servicenow.com/docs/bundle/zurich-servicenow-platform/page/product/service-catalog-manag...
https://www.linkedin.com/pulse/conflicting-ui-policies-dan-covic/
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0551679
---------------------------------------------------------------------------------------------------------------------------------------------------
If my response solves your query, please marked helpful by selecting Accept as Solution and Helpful. Let me know if anything else is required.
Thanks,
Prerna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a Group Management catalog item where, based on Request Type (Create, Update, Retire) I want to show/hide and make some variables mandatory.
I created separate UI policies for each type, but the behavior is inconsistent sometimes fields show/hide correctly, sometimes they don’t, especially after reloading the form.
I tried using different policy orders but not working properly
i have attchaed screenshots
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I can see your screenshots.
The issue happens because you are using the same variable in multiple UI Policies.
For example, the variable “department” is set to mandatory = true in one policy and mandatory = false in another. This is not correct, because when the request is created, the variable will always follow the first policy, and for other request types it will conflict.
Instead of creating separate UI Policies that contradict each other, you should create a single UI Policy with conditions combined using AND (and/or OR when needed).
This way the logic will be consistent, and the variable will only behave as expected based on the right conditions.
See Allen explanation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Rafael Batistot, @prerna_sh actually i was able to achieve this functionality using a client script, and it’s working perfectly. But I’m not sure if this is considered a best practice, or if I should still try to achieve it using a UI policy. Can you suggest the recommended approach?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @Rishabh_N
Based on your scenario, I have the following suggestion that you can evaluate----
A small request from my end, If you like this opinion and your problem is resolved after reviewing and applying it. Please kindly mark this your best answer🌠 ⛑ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community, Let me know if this helps or not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rishabh_N ,
Have you verified that you don't have any other rules e.g. other UI Policies or client scripts interfering
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/