1

All,

Can anybody tell me what is the character limit for a string or a multi line character input string in SNOW.

From the document it is written that multi-line text fields have a 4000 string length and length of a string field 40.

Can anybody confirm.Also what are the characters that are restricted in the input ??

cloudbud
  • 2,948
  • 5
  • 28
  • 54

1 Answers1

2

The topic of a String can get a bit specific to your use case. I'm assuming you're using Eureka, but do mention if it's another.

From http://wiki.servicenow.com/index.php?title=Introduction_to_Fields#Increasing_the_Length

For 254 characters or less, the string field will be a single-line text field. Anything 255 characters or over will appear as a multi-line text box.

Then the String limits are based on what database your instance is running on. Oracle is limited to 4000 characters, but you can put in a request to ServiceNow for a specific field to be increased in size. In case of that, they will need to change the datatype themselves for that.

For an instance running on MySQL, you have more flexibility on your own.

Take a look at the reference between ServiceNow field types and MySQL. http://wiki.servicenow.com/index.php?title=Introduction_to_Fields#Database_Field_Types

In particular the String types

Field Type  Options     Dictionary  MySQL DB Type
String      small       string      VARCHAR(40)
String      medium      string      VARCHAR(100)
String      large       string      MEDIUMTEXT
String      extralarge  string      MEDIUMTEXT

If you choose a type of large or extralarge your field will use the MySQL field of MEDIUMTEXT which has the following limits based on this question Maximum length for MySQL type text

MEDIUMTEXT - 16,777,215 bytes

This now gets in to the type of data you're inputting into the field. I believe ServiceNow uses UTF8 for characters, so if you are generally limited to single byte characters you can store that many characters.

If you are using multi-byte characters, you will have less available but still quite a few.

Be careful when using a lot of characters since it may impact performance. Consider using a Journal field if applicable.

Community
  • 1
  • 1
Kirk
  • 16,182
  • 20
  • 80
  • 112
  • 1
    If you're hosted on mysql, you are going to use "utf8", which unfortunately only supports 3-byte characters (which includes the basic multi-lingual plane). The UTF8 spec now includes 4-byte characters. If you really need 4-byte characters, you need to change the internal_type within servicenow to "string_full_utf8", which uses encoding to accommodate storing 4-byte characters in a 3-byte character space. – Joey Jul 06 '16 at 21:22