The maximum length field for the type Long field is not working.

Bhavani Yavvar2
Giga Contributor

A new field needs to be created. Field type is numeric and Field length is 20

Problem:

created a new dictionary entry with field type long. In the form view after adding 20 characters it is somehow changing to different number(9223372036854775807). The maximum length of 19 characters for the long field type.

 

On product documentation found the max characters which allow is 9223372036854775807 (This is nothing but the range value) Till Quebec we don't have any range for Long field. From Rome we have a specific range Long integers are 64-bit numbers between -9,223,372,036,854,775,807 and 9,223,372,036,854,775,807.

 

Is there any way to get the maximum length as 20 by using numeric field type.

 

Thanks in Advance,

Bhavani Yavvari

 

 

1 REPLY 1

Anish Reghu
Kilo Sage
Kilo Sage

It is not possible to create a numeric field with a length of 20 characters in ServiceNow. The maximum length for a numeric field is 9 digits, which allows for a range of values from -999,999,999 to 999,999,999.

If you need to store a larger number, you can use a long field, which has a maximum length of 19 digits and a range of values from -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807. However, as you mentioned, the long field type is not available in versions of ServiceNow prior to Rome.

Alternatively, you could consider using a different data type, such as a string, to store the numbers. However, this would not allow you to perform numeric calculations on the field and could potentially cause issues with data integrity.

Kindly mark the response as Correct or Helpful.

Cheers,

Anish