Populate a field value from client script if field is not visible

samadam
Kilo Sage

I am trying to set a field value which is not displayed on the form. I have a ui policy that makes it not visible. When I try to se the value it doesn't work. Getting error match not found reset to original. how can i get it working?

4 REPLIES 4

Alp Utku
Mega Sage

Instead of using UI Policy to make It invisible, you can set field as hidden on the form.

Then you can set the value by using Catalog Client Script to set the value of the field.

Sumanth16
Kilo Patron
Hi @samadam ,



This error is generally seen when you try to update the value in the reference field which doesn't exist in the referenced table. 


If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!



Thanks & Regards,

Sumanth Meda


Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @samadam 

 

If you want to invisible then use the UI policy but to set the value you can use client script. Better share your code so taht we can guide you. 

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

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

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @samadam ,

 

If the field you are trying to set is reference field, then make sure you are using the sys_id as a value in your client script.

 

Check this communty link for more reference: 

How to solve the "Match not found, reset to original" error? 

 

Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.


Regards,

Siddhesh