Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Fields in ServiceNow accept string inputs greater than the sys_dictionary max_length value - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Fields in ServiceNow accept string inputs greater than the sys_dictionary max_length value
KB0685779

Fields in ServiceNow accept string inputs greater than the sys_dictionary max_length value


49662 Views Last updated : May 7, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

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

Any string field that is larger than varchar(255) is given the mediumtext data type. In the client, it will be represented as an HTML textarea, instead of an HTML input. The maximum length of mediumtext is 16,777,215 bytes.

In terms of restricting the number of characters stored in the field, this is controlled by the database and not restricted by the product. For example, if the field has been changed in the database to varchar(45), you can enter 45 characters in the input box. It does not matter if max_length is still set at 40, or has been otherwise modified to a different value.

Similarly, if you are 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. Again, max_length will not cause truncation of the imported value.

There are recurring questions about enforcing the max_length of 4000 characters on either or both of the comments/work_notes fields for task. These fields support the input of HTML with the use of [code][/code] tags.

The use of the mediumtext datatype and not performing truncation based on the max_length value is a deliberate decision. Truncating HTML, XML, or JavaScript results in data corruption/data loss.
 

Exceptions

There are some exceptions to this for example sc_task.short_description.

By default this field is defined in the database as varchar(160) and thus it does enforce the default max length of 160 characters. 

Setting the max length of this field to anything above 255 will then cause it to change from a varchar() to mediumtext

 

In addition, the activity stream composer in workspace applications will enforce max_length on the input text area. This is intentional despite the inconsistency with other platform behavior.

Release

In Xanadu, and forward, Workspaces will enforce a 4000 character limit on input.

Resolution

In Xanadu, and forward, Workspaces will enforce a 4000 character limit on input.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.