UI Policy action set value not working.

ArmegaA
Tera Contributor

I have created in a PDI a UI Policy on the incident table that has actions to set the value of some fields to true. One is true/false one is String ( ignore the misspelling) . 

Screenshot 2026-07-08 at 13.58.06.png

 THe actions look liek this : 

Screenshot 2026-07-08 at 13.55.49.png

 Ii is simply a value action set value and the value is true. I have no condition. I don't understand why it is not setting the value on a random incident I picked:

Screenshot 2026-07-08 at 13.57.01.png

These are newly created fields just for this purpose so they are not in any other br, uip, uia etc. I thought maybe for the true false it doesnt do a converison from string to boolean and that is why it is not populating but the string field doesnt work either.  If I try to do a script in this and just say setValue it works as always.  Is this Set Value action simply not made for this kind of logic? What is it used for in that case?

3 ACCEPTED SOLUTIONS

Mark Manders
Giga Patron

What's your use case? If you don't have any conditions, it should just be a default value, right? 

When I check on the OOB UI policy form, there is no 'set value' available. There's only 'clear the field value'. I think the 'set value' is meant for catalog ui policies, where it is available OOB.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

Ehab Pilloor
Mega Sage

Hi @ArmegaA,

 

The Set value field is not meant for standard UI Policies.  Check existing OOB UI Policies where UI Policy action doesnt have that field.

EhabPilloor_0-1783509992272.png

You can try setting value for catalog variables.

 

Regards,

Ehab Pilloor

View solution in original post

Aditya_hublikar
Giga Sage

Hello @ArmegaA ,

 

Based on my understanding, a UI Policy on a form is primarily used to control field visibility, mandatory, and read-only states. By default, UI Policies do not set field values.

From your screenshot, it appears that you added the field to the form by configuring the form layout. I tested the Set Value functionality, and it works for Catalog Variables, but I couldn't get it to work for a standard form field.

So, I don't think this approach will work here.

If this helps, please mark it as Helpful and Accept as Solution.

Regards,
Aditya

View solution in original post

6 REPLIES 6

Aditya_hublikar
Giga Sage

Hello @ArmegaA ,

 

Based on my understanding, a UI Policy on a form is primarily used to control field visibility, mandatory, and read-only states. By default, UI Policies do not set field values.

From your screenshot, it appears that you added the field to the form by configuring the form layout. I tested the Set Value functionality, and it works for Catalog Variables, but I couldn't get it to work for a standard form field.

So, I don't think this approach will work here.

If this helps, please mark it as Helpful and Accept as Solution.

Regards,
Aditya

Tanushree Maiti
Tera Patron

Hi @ArmegaA 

 

In ServiceNow, setting a UI Policy Action to True means the specific field behavior (such as Visible, Mandatory, or Read-only) will be actively applied whenever the policy's condition is met.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti