- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 10:36 AM
When you create a variable for a requested Item, is there a way to set a limit to the number of characters that can be entered into the field?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 10:53 AM
You may find many solution on the community for this, an example you can use script like below with onChange() client script.
var str = newValue; // var str = g_form.getValue('variable_name')
var len = str.length;
if(len> 10 && len< 5)
{
g_form.setValue('variable_name','');
alert('Please enter atleast 5 and maximum of 10');
}
Or you can Click on configure variable. Goto default Value tab-->in variable attribute field add below.
max_length=40 // OR set the limit value which you want to set.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 10:38 AM
You will need to write a onChange client script on that field to limit the characters.
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
‎03-07-2018 10:53 AM
You may find many solution on the community for this, an example you can use script like below with onChange() client script.
var str = newValue; // var str = g_form.getValue('variable_name')
var len = str.length;
if(len> 10 && len< 5)
{
g_form.setValue('variable_name','');
alert('Please enter atleast 5 and maximum of 10');
}
Or you can Click on configure variable. Goto default Value tab-->in variable attribute field add below.
max_length=40 // OR set the limit value which you want to set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2019 10:46 AM
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2021 09:16 AM
the max length attribute on a record producer worked perfectly. thank you
simple