Pro not respecting database field scale settings

527
4
01-25-2023 10:21 AM
Labels (2)
ZorbaConlen1
Occasional Contributor III

Hi. I'm running into an issue with Pro, where it changes field properties for numeric field types. In the SDE (sql server) table, the field has a scale setting of 10. This indicates that 10 decimal places should be shown after the decimal. Actually, it's a spatial view, but the view properties show scale setting of 10, and 10 digits are shown when previewing the data.

ZorbaConlen1_0-1674670005039.png

ZorbaConlen1_3-1674670681752.png

 

When I add that view to Pro, the scale is shown as 8. 

ZorbaConlen1_1-1674670309752.png

And when I publish it as a map service, only 8 places after the decimal are shown

ZorbaConlen1_2-1674670465597.png

The upshot is that I can't display the data properly in my web app. 

One may ask why do we need to show 10 decimal places. Normally, it would not be an issue, but this is an app for professional land surveyors and for that audience it's significant to drop 2 decimal places.

Also, I'd like to avoid converting the field to text as a work-around.

Thanks in advance for any solutions to this issue.

 

 

 

 

0 Kudos
4 Replies
George_Thompson
Esri Frequent Contributor

I am not 100% but wonder if it is a limit on the double field; https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/arcgis-field-data-types.htm

I would work with technical support on this.

Can you create a field in Pro (outside of the view) that has the precision you need?

--- George T.
0 Kudos
ZorbaConlen1
Occasional Contributor III

Thanks George. In reading the docs, I'm not seeing it explicitly stated that there is a limit on scale. 

I think you are right, it will probably require help from esri support.

0 Kudos
RhettZufelt
MVP Frequent Contributor

I set up a field in SQL with the same setting (numeric(38, 10)) and see the same thing in Pro.

However, in Fields, you can set the number format and decimal places.  Setting to 10 Decimal Places will show you 10, unless there are zeros, then it will drop them and only show up to 10 places with value.

If you need 10 places regardless of the zeros on the end, use the pad with zeros option.

RhettZufelt_1-1674674884143.png

R_

0 Kudos
ZorbaConlen1
Occasional Contributor III

Hi Rhett,

I found that setting but it does not solve my issue. It appears to be a display setting and is ignored when I publish the map service. 

Thanks for the suggestion.

0 Kudos