limit single line text variable in RP form to 255 char
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 11:55 PM
hi, we have a requirement to limit one Record producer text field variable chrarcter limit to 255 char , please help me in this issue.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 11:58 PM - edited 10-24-2023 11:59 PM
Hi @Amit Dey1
- Navigate to the variable of single-line text or wide single line-text
- Open the Default Value tab
- Add the variable in Variables of single-line text or wide single line-text
For example: max_length=255
Source: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718701
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 12:09 AM
you can check link mentioned by Peter.
Please let us know if you are stuck
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 12:15 AM
Hi @Amit Dey1
Let's put this attribute "max_length=225" into the Variable attributes.
Service Catalog variable attributes
max_length
Sets the maximum number of characters allowed in the field. By default, the field accepts long strings of text, several thousand characters. Set the max_length attribute as appropriate for the information that the variable is collecting. For example, to allow for entry of an address, set max_length=200, or other appropriate length.
Applicable variables: Single-line text, Wide single-line text
Let me know if it works for you.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 01:14 AM
hi @Peter Bodelier @Ankur Bawiskar @Tai Vu
while typing the last 255th character , can we show any field message or error message that max 255 character reached?