Suzanne Smith
ServiceNow Employee
ServiceNow Employee

There are many locations in ServiceNow where character length can be an issue. For example, the service catalog, suggestion fields, and choice lists. The Max length field is key to understanding and controlling character length. You set the standard for how long is too long for a text field. You wouldn't want a short description to be 500 characters, but you may want to allow that many characters in the description.

 

Max length sets the maximum number of characters for a field. You can only change this value for string fields. A length of under 254 appears as a single-line text field and any number greater than 254 appears as a multi-line text box. In the following example, the Short description field is a single-line text field and the Description field is a multi-line text field:

character_length1.jpg

To see the exact max length setting for a field, right-click on the field label and select Show [fieldname]. In the following example, the user right-clicked on the Short description label on the Change Request form and selected Show - "short_description'. In this case, the Max Length is set to 80.

character_length2.jpg

 

Editing max length

To edit the max length, open the dictionary and then a table.

  1. Navigate to System Definition > Dictionary.
  2. Click a name in the Table column.
  3. Edit the Max length field. The following example shows the Max length field for the change_plan column on the change_request table:

character_length3.jpg

 

Editing max length of a service catalog variable type

Service catalog variables collect and distribute customer choices when ordering catalog items. Two service catalog variable types support the max_length attribute: Single Line Text and Wide Single Line Text. The maximum allowable value for the max_length attribute is 4000.

character_length4.jpg

 

Editing max length of suggestion fields

Suggestion fields enable users to select predefined text and can be used on any text or journal field. In the following example, the user clicked the suggestion icon next to the Short description field on a new change request and received a list of common requests. Maximum character length for a suggestion field is 4000.

character_length5.jpg

 

Editing max length of choice lists

A choice list is a type of field that enables users to select from a defined set of choices. You define the choice list and have complete control of the choices, behavior, and appearance. The following example shows the choice list for the Category field on a change request. Maximum character length for a choice list is 40.

 

character_length6.jpg

 

Additional tips and information:

  1. Subject text from the email client can be truncated because the Subject field on the email client allows a larger character count than the default setting for the Subject field on the Email table. To resolve the problem, increase the max length value for the Subject field on the Email table.
  2. Users on an Oracle instance cannot increase the maximum length of a string field to a number greater than 4000 through the application UI. This action requires the CLOB datatype in Oracle. To increase beyond 4000, log an incident with ServiceNow Customer Support to request the change.
  3. If you put a string value much longer than the specified max length in the database dictionary, the string is stored and displays properly on MySQL, but is truncated on Oracle if the max length is over 255. For more information, see Dictionary max length property is not enforced.
  4. When data is loaded from an external data source, such as JDBC or LDAP, some columns are truncated causing missing data. Changing the max length of the column can solve the issue. For more information, see Troubleshooting Import - Missing data when the column length is too short.
  5. If you have problems with auto-complete suggestions on reference fields, check that they are properly configured (including the max length).
  6. In the community, Daryll Conway had an issue loading CIs on a related list. He cleverly solved his own problem by increasing the field character length.
  7. Troy Smith wanted to limit the subject length in his ESS screen for Ask A Question so it matched the itil subject length on incident records. Mark Stanger answered with information about the max length attribute.
22 Comments