Multi-line text char limit workaround
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 04:14 AM
Hi, We have multi-line text field on our service catalog which is getting truncated to a certain max length (approx 4k). There's a business need to increase this to more than the size limit or if possible, bypass the limit. Is there any programmatic solution or workaround to achieve this or without altering any properties or default configuration? One of the options is to go via attachment. Has anyone ever tried this? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 04:19 AM
Hi @cspra
I don't think that the field data would be truncated post 4k limit. The limit is only applicable to multi-line text fields not for catalog variables. Refer https://www.servicenow.com/community/now-platform-forum/character-limit-on-multi-line-text-variable/...
Still, if you are facing this issue, I could think of a a possible solution of keeping two multi line text fields on the catalog item, one visible to the user where the user will give in the input and another which will just serve as a placeholder to hold the extra text beyond 4k characters. Their is a system property "glide.ui.textarea.character_counter" which could be enabled. This property adds a counter under text fields, such as the Additional Comments and Work notes fields. The counter is dynamically updated as users enter text.
Once the user has exhausted the 4k limit, you can make the other multi line text variable display as true and ask the user to continue into that box. Post catalog submission, you can concatenate content from both the variables and use it.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.