- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 10:18 AM
Created a few Integer Fields, Assigned them a Max Length of 4 . But It still accepts more than 4 . How do I fix this ?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 10:42 AM
This thread could be useful. You can't restrict it based on the length. You will have to add your own validations
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 10:26 AM
You can add a Business Rule to show error message if the field value >9999
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 10:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 10:42 AM
This thread could be useful. You can't restrict it based on the length. You will have to add your own validations
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 10:37 AM
Hi Rali,
Here's an onchange script that returns an alert and clears out the value of the field if it's not 4 digits.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
if (newValue.toString().length != 4) {
alert("Please enter a 4 digit number");
g_form.setValue('fieldname', '');
}
}
Thanks,
Nithish
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.