ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 06:21 AM
importance of order number in ui policy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 11:57 AM
The order number in the UI policy is the order it will run. The lower the number the earlier it will run in comparison to other UI policies on the table. For example
UI policy A has an order of 100 and HIDES field A
UI policy B has an order of 200 and SHOWS field A
Those are conflicting UI Policies, so the form would load, UI Policy A would run first since it has the lower order number, so it would HIDE field A, but then UI Policy B would run second as it has the higher order number, and would SHOW field A. So in this case field A would always be shown. If you reversed these orders, then Field A would always be HIDDEN as UI Policy A would run last.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:07 PM
Hi @CherukuA
UI Policies execute in the other indicated by the Order field, starting with one. The higher the value, the later it executes. This also means that a higher value in the Order field means that the policy will take priority over others with a lower Order value
for more knowledge check below links
if my answer helps you mark helpful and accept solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:12 PM
Hello @CherukuA
Not only in UI policies, ServiceNow executes other things like Client scripts, Business Rule etc in ascending order.
The lower value first, till the higher value it executes.
Please refer below doc:
Please mark the answer as helpful and correct if helped.
Kind regards,
Ravi Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:19 PM
Hello @CherukuA ,
The order number in a UI Policy defines the sequence in which policies are executed. Lower numbers execute first, and higher numbers follow. This becomes crucial when multiple policies affect the same field, as the last executed policy takes precedence.
For example, if one policy with a lower order hides a field and another with a higher order shows it, the field will end up being visible. To avoid conflicts or unexpected behavior, always review the order and test the interaction of policies thoroughly.
A clear order ensures predictable outcomes, especially in forms with complex logic.
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Regards,
Aniket