Select to view content in your preferred language

Label, rounding decimals, with text

457
1
06-15-2022 06:44 AM
ScottJones1
Frequent Contributor

I am trying to build a WEBAPP with various mountain bike trails. I have created some circuits so the team coach can determine which groups should ride which circuits. The pop ups have reduced the distance decimals to 1, but the Labels do not? I tried to use the round(feature, number) but got a NaN?

Is there a way to do this? the same thing happened in ArcPro when I added distance to symbology.. 

The field is calculated from mileage. If it were a one time deal I would just create a text field, but I imagine building more trails and ..... if I had to do that each time it would be a pain.

I would also like to add text? so instead of 'Circuit 1  7.87387483647364' I could display Circuit 1; 7.8 mi

 

0 Kudos
1 Reply
JohannesLindner
MVP Alum

You will have to create an Arcade expression for that.

 

Before:

JohannesLindner_0-1655360904616.png

 

Create a label expression:

JohannesLindner_1-1655360976410.png

"Einleitung " + $feature.OBJECTID + ": " + Round($feature.QErlaubt, 2) + " m³/s"

// or, with newer syntax:
`Einleitung ${$feature.ObjectID}: ${Round($feature.QErlaubt, 2)} m³/s`

 

After:

JohannesLindner_2-1655361120916.png

 

 

In Pro, it's the same.

Before:

JohannesLindner_3-1655361475583.png

 

After:

JohannesLindner_4-1655361540277.png

 


Have a great day!
Johannes