- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:03 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:42 PM
you can have a hidden text variable and store the flag
1) set the flag as valid in both the onchange catalog client scripts if it's valid number
2) set it as invalid if any 1 number is not valid
3) then use onSubmit and check what's the flag value and if it's valid then allow submitting
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:39 PM
even if the value is invalid it still submit the record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:44 PM
Another approach is don't use GlideAjax in your onSubmit script because of the restrictions I mentioned i.e. synchronous Ajax is not allowed in portal
Why not directly use regex in client side?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:42 PM
you can have a hidden text variable and store the flag
1) set the flag as valid in both the onchange catalog client scripts if it's valid number
2) set it as invalid if any 1 number is not valid
3) then use onSubmit and check what's the flag value and if it's valid then allow submitting
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 10:43 PM
thank you ankur this tips is works.