- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2025 02:55 AM
I have a few fields with Reference Qualifier attached to them. Due to templates, users have some invalid values stored in them. I want to make sure that data is saved with only valid values.
How can it be done to simulate the ref qual on those fields before submit/save?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2025 03:32 AM
Hello,
Use the onChange or onSubmit functions to send the field's current value to the server. Contains a function that takes the value and the Reference Qualifier string, and returns true or false indicating if the value is valid based on the qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2025 03:36 AM
You'll have to call a Script Include via GlideAjax in an onSubmit Client Script, passing in the value of each field that needs checked. The Script Include needs to be coded in such a way as to check the reference table for each field against the criteria in each reference qualifier, returning a message or certain value if any are invalid, then the Client Script can abort the submit if that value is returned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2025 03:56 AM
then in script of business rule you need to hard-code the filter condition or logic for those fields configured in dictionary level and then handle that.
that's the only way
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have used the OnUpdate Business Rule and used the same reference qualifiers that are there on the field(s). In addition, I have passed the selected value (text/sys_id) to check if it is part of the values returned by Ref Qual
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2025 03:36 AM
You'll have to call a Script Include via GlideAjax in an onSubmit Client Script, passing in the value of each field that needs checked. The Script Include needs to be coded in such a way as to check the reference table for each field against the criteria in each reference qualifier, returning a message or certain value if any are invalid, then the Client Script can abort the submit if that value is returned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have used the OnUpdate Business Rule and used the same reference qualifiers that are there on the field(s). In addition, I have passed the selected value (text/sys_id) to check if it is part of the values returned by Ref Qual
