Select to view content in your preferred language

Labels add decimal places to number - ArcGIS Pro

515
4
Jump to solution
05-31-2024 03:37 PM
AmyNewsam
Regular Contributor

Hi All,

I created a shapefile and added a number field with the specifications float, precision = 4, scale = 2.  When I label the features using the number field, I get 15 random extra digits to the right of the decimal place.  I'm using Pro 3.2.2.  Any help appreciated.

Thanks,

Amy

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

You can use the round function to control the decimal points on labels as shown here.

Don't see it in the docs, but 'floor' works as well as round depending on which direction you want to go.

R_

View solution in original post

4 Replies
RhettZufelt
MVP Notable Contributor

You can use the round function to control the decimal points on labels as shown here.

Don't see it in the docs, but 'floor' works as well as round depending on which direction you want to go.

R_

AmyNewsam
Regular Contributor

Thanks Rhett, that worked great!  It does seem odd though, since the number is set to a scale of 2, and I entered the number manually as "1.6", why would it add all those extra digits?  just curious.  😉

0 Kudos
RhettZufelt
MVP Notable Contributor

Couldn't tell you why, but can confirm it.  If I create a field as 'Double', it behaves as expected.

Thought maybe you are using a File Geodatabase (or mobile) and according to this, precision/scale is not supported.

However, testing in SDE environment produces the same result.........

Also, noticed the number format in the fields view doesn't alter this anymore either.

R_

0 Kudos
AmyNewsam
Regular Contributor

Thanks, Rhett.  I'm not using a file geodatabase or mobile, so I guess it will remain a mystery.  🙂

0 Kudos