The maximum length field for the type Long field is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2023 02:34 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2023 08:40 PM
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