UI Policy with setValue not setting the correct value

matthew_hughes
Kilo Sage

I've got the following UI policy for a catalogue item that is used to update the value of a certain field when the conditions are met:

 

matthew_hughes_0-1707835977829.png

 

The script of the UI Policy is:

matthew_hughes_1-1707836042535.png

 

However, what I'm finding is that if I go onto my catalogue item and trigger the UI Policy, it's not setting the to field to Not Applicable, but Read Only:

 

matthew_hughes_2-1707836126198.png

So I was just wondering if anyone knows why the text specified in SetValue is not working as it should?

 

 

 

11 REPLIES 11

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @matthew_hughes 

 

All experts already answered, i am new to script and I thought the NOT applicable should be replaced by value.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Service_RNow
Mega Sage

Hi @matthew_hughes 

Sulotion:1 Please try to make a change UI Policy Run order if you using 2 UI Policy same at a time.

Sulotion:2 Try with On change Client script in same approach what you have done in UI Policy.

 

Please hit the Thumb Icon and mark as Correct !!