I have a milepost layer that I want to use the number as a label.
The data source is the Washington State Department of Transportation 1/10th of a mile rest service link.
https://data.wsdot.wa.gov/arcgis/rest/services/Shared/MilepostValues/MapServer/3
In the pop up window I tried showing no decimal places or 1 decimal place.
In the manage fields window I unchecked to not show thousands separator.
After clicking save the label still shows lots of numbers after the decimal place.
How can I fix this?
Solved! Go to Solution.
I'm not positive, but I think the setting you changed might only be for viewing in the attribute table.
You could try a one-line arcade script for the labels. Hit the </> button to the right of the field selection and enter the following code:
return Text($feature.SRMP,'#.0')
That should get you a label with one decimal point and no thousands delimiter.
If memory serves, you can do the same thing in the Pop-up settings, as well, but you'll have to enter the code again there. All of those sections have their own separate settings for display formats.
I'm not positive, but I think the setting you changed might only be for viewing in the attribute table.
You could try a one-line arcade script for the labels. Hit the </> button to the right of the field selection and enter the following code:
return Text($feature.SRMP,'#.0')
That should get you a label with one decimal point and no thousands delimiter.
If memory serves, you can do the same thing in the Pop-up settings, as well, but you'll have to enter the code again there. All of those sections have their own separate settings for display formats.
This worked, thank you!!!
I clicked on the icon to create a new expression:
Then pasted in the expression you gave me and clicked done:
now all of the mileposts have one number after the decimal point:
I think the manage field settings are distinct from labelling settings unfortunately.
The guide here show's how to add a custom expression fairly easily. Change the code as below.
https://support.esri.com/en-us/knowledge-base/how-to-label-a-layer-with-a-rounded-decimal-value-and-...
Round($feature["SRMP"], 0)
I had to create a custom expression in the label settings and in the pop up window settings and change the field settings as well.
It would be really great to have one place where the settings have to be change to get it to be consistent in the table, the labels and the pop up window.
Here are screenshots of having to add the same custom expression to the pop up window:
I created this idea post, so hopefully they can simplify the steps: