Populate a field value from client script if field is not visible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 02:29 PM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 02:32 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 04:20 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 04:29 AM
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 08:26 AM
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