We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

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

Hi @matthew_hughes 

 

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

*************************************************************************************************************
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

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

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 !!