Why increased max length of string field is not working in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:15 AM
By default string fields are created with max length of 40 characters, I tried updating max length of string field under "facilities_request" table to 120 with update set. After update it is accepting 120 characters but when I click on save, form reload and string field show only 40 characters.
I checked dictionary entry and it also shows max length 120 characters. At servicenow level it is taking 120 characters but at database level only store 40 charters. It took me around 30 mins to complete the transaction of max length update.
- In lower environment I updated two string field lengths from 40 to 120 and captured in update set. it took me approx 50 mins to update both.
- Everything is working fine in lower env, but when I commit update set to Testing instance only one field working fine and other field only storing 40 characters and dictionary show both fields have max length 120.
- 20-30 mins to commit update set
- task table size: +6.8m
- Labels:
-
Instance Configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:21 AM
Hey,
Description
When you create a new sys_dictionary record to define a new string field, the max_length is mandatory. Despite the similarity of the name to HTML's maxlength attributes for input or textarea tags, this is not enforced as a limit in the client or server.
Max length is not enforced on the Now Platform
Fields in ServiceNow accept string inputs greater than the sys_dictionary max_length value. This is the expected behavior of the product.
When you create a string field in ServiceNow, the underlying column in the database is created with a default data type based in part on the specified max_length value:
- Small (40) = varchar(40)
- Medium (100) = varchar(100)
- Large (1000) = mediumtext
- Extra Large (4000) = mediumtext
FOllow below article for more details:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 11:17 PM
Hello Aman,
Yes, I think database column length is still 40 characters not updated to 120 characters.
Is there a way to check database column length from servicenow end?
Dictionary entry still shows 120 as Max_length.
And everything is working fine in dev instance as there we have updated the fields and captured in update set. But in testing instance we are getting this issue and I believe same will happen in production.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:22 AM
Hi NK,
Did you try to do this from form designer?
Configure > Form designer
Thanks,
Yousaf
***Mark Correct or Helpful if it helps.***

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:24 AM