Diplay "zeros" in decimal number

Alexandre17
Tera Expert

Hello. How display/show zeros after "point/comma" in decimal number, everytime ?

 

Only display 1.000 (or 1.000), but i need display   like this  decimal numbers: 1,000.00 (or 1.000,00).

 

Alexandre17_0-1669983532203.png

 

Alexandre17_1-1669983587100.png

 

 

 

1 ACCEPTED SOLUTION

Hi Alexandre, you need to be logged in the ServiceNow site to see this article.

Here is the content:

Decimal type fields do not show decimal places with trailing zero digits

 

Description

'Decimal' type fields do not display decimal places if any trailing zero digit comes at the end of the numeric value.

Steps to Reproduce

 

  1. Login a demo instance. 
  2. Navigate to incident.do
  3. Right click from top strip, Context menu > Configure > Form layout > Create New field
  4. Create a new field u_sn_decimal as Decimal type. 
  5. Configure it as visible on the Incident form. 
Enter any of the following values in the new field, and observe the unexpected outcome:
  • 23.00 - Once saved, the value shows as 23 
  • 23.10 - Once saved, the value shows as 23.1  
However, if the value entered is 23.12, then it stores as expected with the two decimal precision. 

Workaround

This problem has been identified as a future product enhancement.
 
It is currently not possible to format the display of a Decimal field to show a precision of two decimal places when it involves trailing zeroes, as these get stripped. If the field stores a monetary value, using different field type as a workaround, it displays two decimal places after saving the record even when the decimal places are zeroes:
  • Currency - Decimal field with two digits after the decimal point. When displayed on a form, a currency field also includes an additional choice list for selecting the currency type. If there is no default value for the field, empty currency fields use the default system currency. Adding a value causes the field to use the preferred currency of the active user.
  • Price - Decimal field with an additional drop-down for currencies. 
Ref.:

 


Related Problem: PRB700640
 
Regards,
JP

View solution in original post

3 REPLIES 3

@JP - Kyndryl , could you check this link ? Not work from here...

Hi Alexandre, you need to be logged in the ServiceNow site to see this article.

Here is the content:

Decimal type fields do not show decimal places with trailing zero digits

 

Description

'Decimal' type fields do not display decimal places if any trailing zero digit comes at the end of the numeric value.

Steps to Reproduce

 

  1. Login a demo instance. 
  2. Navigate to incident.do
  3. Right click from top strip, Context menu > Configure > Form layout > Create New field
  4. Create a new field u_sn_decimal as Decimal type. 
  5. Configure it as visible on the Incident form. 
Enter any of the following values in the new field, and observe the unexpected outcome:
  • 23.00 - Once saved, the value shows as 23 
  • 23.10 - Once saved, the value shows as 23.1  
However, if the value entered is 23.12, then it stores as expected with the two decimal precision. 

Workaround

This problem has been identified as a future product enhancement.
 
It is currently not possible to format the display of a Decimal field to show a precision of two decimal places when it involves trailing zeroes, as these get stripped. If the field stores a monetary value, using different field type as a workaround, it displays two decimal places after saving the record even when the decimal places are zeroes:
  • Currency - Decimal field with two digits after the decimal point. When displayed on a form, a currency field also includes an additional choice list for selecting the currency type. If there is no default value for the field, empty currency fields use the default system currency. Adding a value causes the field to use the preferred currency of the active user.
  • Price - Decimal field with an additional drop-down for currencies. 
Ref.:

 


Related Problem: PRB700640
 
Regards,
JP