Why ServiceNow fields accept string inputs that exceed the max_length valueIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Learn why ServiceNow fields accept string inputs that exceed the max_length value defined in the Dictionary [sys_dictionary] table, and how the platform handles string field storage. Max length is not enforced on the Now Platform When you create a Dictionary [sys_dictionary] record to define a new string field, the max_length attribute is mandatory. Despite the similarity to HTML's maxlength attributes for input or textarea tags, this value is not enforced as a character limit in the client or server. This is the expected behavior of the platform. How string field data types are determined When you create a string field, the underlying database column is created with a data type based in part on the specified max_length value: Small (40): varchar(40)Medium (100): varchar(100)Large (1000): mediumtextExtra Large (4000): mediumtext Any string field with a max_length greater than 255 is assigned the mediumtext data type. In the client, the field is represented as an HTML textarea instead of an HTML input. The maximum length of mediumtext is 16,777,215 bytes. Character limits are controlled by the database The number of characters stored in a field is controlled by the database, not by the max_length value. For example, if a field is defined in the database as varchar(45), you can enter 45 characters regardless of whether max_length is set to 40 or a different value. Similarly, when importing data, if the database column is larger than the max_length value, you can import values up to the size limit of the database column. The max_length value does not cause truncation of imported values. Why truncation is not performed There are recurring questions about enforcing the max_length of 4,000 characters on the comments or work_notes fields for task records. These fields support HTML input with the use of [code][/code] tags. The use of the mediumtext data type and the decision not to truncate based on the max_length value is deliberate. Truncating HTML, XML, or JavaScript content results in data corruption or data loss. Exceptions Some fields enforce the max_length value based on their database column definition. For example, the sc_task.short_description field is defined in the database as varchar(160) by default, which enforces a maximum of 160 characters. Setting the max_length of this field to a value above 255 causes the data type to change from varchar to mediumtext. Note: A regression introduced in the Yokohama release caused the max_length value to be enforced in the Workspace activity stream composer. This was not intended platform behavior. For details and updates, see the Known Error article. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All supported releases Note: Beginning with the Xanadu release, Workspaces enforce a 4,000-character limit on input fields. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } No action is required. The max_length value is not enforced as a character limit on the Now Platform by design. The number of characters a field accepts is determined by the underlying database column type. Beginning with the Xanadu release, Workspaces enforce a 4,000-character limit on input fields. If you are working in a Workspace and need to enter more than 4,000 characters, contact your ServiceNow admin team to discuss field configuration options.