Select to view content in your preferred language

Field Length/Precision Display

27
5
6 hours ago
m3
by
Frequent Contributor

Can anyone explain this? 

In the field it displays 48.3 and then when you click on the field to edit it it displays a bunch of 0s down to the subatomic level.

I've run round(field, 1) on it and and manually typed the numbers in and it still does this


(view in My Videos)

0 Kudos
5 Replies
Robert_LeClair
Esri Esteemed Contributor

Likely your numeric field type is Float and is expected behavior for float storage.  One option is to the change the display formatting by opening the Fields Designer for the layer.  In the Fields Designer, locate the Number Format column and double click that cell for the attribute field.  Then click the 3 dots to open the Number Format pane.  Change the Rounding for decimal places to 1 and then click OK.  This should remove the "subatomic" number format.

0 Kudos
m3
by
Frequent Contributor

It still does the same thing after changing that setting and restarting Pro.  

As a side note, we haven't been able to actually create a numeric field that only has 1 decimal place, it keeps defaulting to whatever the default it.

0 Kudos
EdenRotonda
Esri Contributor

Did you confirm that you are using Float? If you are, you can always trying converting the field to Double instead as Double is 64-bit and is more precise than a Float. You can do this by making a new numeric field with the Double data type and then use Calculate Field to transfer over your Float values. 

0 Kudos
m3
by
Frequent Contributor

They are both Double already

0 Kudos
Robert_LeClair
Esri Esteemed Contributor

Even as a Double (64‑bit), this can still happen. Double is binary floating point, so many decimal values (including 48.3) cannot be stored exactly; Pro may show a nicely rounded display (48.3), but when you click into the edit control it can reveal the raw stored IEEE‑754 approximation, which looks like a long decimal. This is expected behavior, not something Round(field, 1) will permanently “clean up.” 

If your goal is “never see the long value even when editing” - Use a formatted text field for editing/display with an Arcade expression in a new field -  Text($feature.DBH_OLD, "#.0") as suggested here - Solved: Decimal Places in Attribute Pane - Esri Community

0 Kudos