- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 03:32 AM
I have a table string field where I want to set a maxlength of 240 characters. I have done that using the dictionary entry, but I also want to show an error message if it exceeds 240 characters. I have written an onchange client script with showfieldmsg error, but it's not working.
Any suggestions for this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 03:54 AM
The line.length will never exceed 240 chars because the limit is 240 chars.
So its not a valid if statement.
Maybe change the line.length > 240 to line.length == 240
and then g_form.showFieldMsg('line_description', 'Line description cannot not exceed 240 characters.', 'error'); or something like that

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 03:46 AM
@Vaishali 11 Could you please post your script here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 03:49 AM
@Sandeep Rajput , please find the script below, written on onchange of the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 03:54 AM
The line.length will never exceed 240 chars because the limit is 240 chars.
So its not a valid if statement.
Maybe change the line.length > 240 to line.length == 240
and then g_form.showFieldMsg('line_description', 'Line description cannot not exceed 240 characters.', 'error'); or something like that