Select to view content in your preferred language

new map viewer: label is showing the thousands seperator even though I unchecked the box in the field settings

278
5
Jump to solution
03-19-2025 03:56 PM
L77
by
Frequent Contributor

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.

L77_1-1742424706547.png

L77_0-1742425985314.png

 

After clicking save the label still shows lots of numbers after the decimal place.

How can I fix this?

L77_2-1742424754211.png

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
MErikReedAugusta
MVP Regular Contributor

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.

------------------------------
M Reed
"The pessimist may be right oftener than the optimist, but the optimist has more fun, and neither can stop the march of events anyhow." — Robert A. Heinlein, in Time Enough for Love

View solution in original post

5 Replies
MErikReedAugusta
MVP Regular Contributor

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.

------------------------------
M Reed
"The pessimist may be right oftener than the optimist, but the optimist has more fun, and neither can stop the march of events anyhow." — Robert A. Heinlein, in Time Enough for Love
L77
by
Frequent Contributor

This worked, thank you!!!

I clicked on the icon to create a new expression:

L77_0-1742475724759.png

Then pasted in the expression you gave me and clicked done:

L77_1-1742475752725.png

 

now all of the mileposts have one number after the decimal point:

L77_2-1742475809944.png

 

DavidPike
MVP Notable Contributor

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)

DavidPike_0-1742428201842.png

 

0 Kudos
L77
by
Frequent Contributor

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:

L77_0-1742476969550.png

L77_1-1742476989379.png

 

 

0 Kudos
L77
by
Frequent Contributor

I created this idea post, so hopefully they can simplify the steps:

https://community.esri.com/t5/arcgis-online-ideas/simplify-decimal-place-configuration-in-new-web/id...

 

0 Kudos