
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:19 AM
Afternoon, is anyone able to confirm if this can be done please. When building a catalog item, is it possible to set a maximum length value on a single line text variable unique to that variable?
I cant change the current dictionary value because of the following warning: The field 'Question' on table 'Question' contains existing data records (3593) that exceed the new length
I did find one post that suggested this could be done by an on load client script, but I havent got it to work, tried question.question_text and current.variables.variable_name
function onLoad() {
setTimeout(function() {
jQuery('input[name="current.variables.variable_name"').attr("maxlength","10");
}, 1000);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 07:42 AM
Hi @Cirrus ,
If you will set the field "Variable attribute" to "max_length=1000", It will allow the user to enter the input into field till max length of 1000 charater.
If the field "Variable attribute" is not present on your form in default view, just bring it out by configure->form layout option.
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 07:54 AM
Hello @Cirrus
Thank you for marking my response as helpful.
if my response helped mark it as correct as well so that it benefits future readers/
Kind Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 07:11 AM
Hi @Cirrus ,
Have you considered using Service catalog variable attributes.
Hope it solves your query.
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 07:42 AM
Hi @Cirrus ,
If you will set the field "Variable attribute" to "max_length=1000", It will allow the user to enter the input into field till max length of 1000 charater.
If the field "Variable attribute" is not present on your form in default view, just bring it out by configure->form layout option.
Thanks and Regards,
Rahul

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 07:49 AM
Thankyou, exactly what I needed