I have a requirement in a Record Producer where I need to restrict a variable input to a maximum of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I have a requirement in a Record Producer where I need to restrict a variable input to a maximum of 100 characters at the time of submission.
The user should not be able to submit the record if the entered value exceeds 100 characters. I would like to implement this validation on the Record Producer variable during submit.
Could you please suggest the best way to achieve this? Should this be done using a Catalog Client Script (onSubmit), UI Policy, or any out-of-the-box configuration?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi
You can update variables attributes max_length=100
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Follow her and your work done.
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/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks, this helped me. I was able to resolve the issue using your suggestion. Appreciate the support!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @jeevanjadhav ,
use an Out-of-the-Box (OOTB) Variable Attribute
function onSubmit() {
var val = g_form.getValue('your_variable_name');
if (val.length > 100) {
g_form.addErrorMessage('exceed 100 characters.');
return false; }
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for.
Thank You

