ArcGIS Pro doesn’t label values as they appear in the table,

7304
14
Jump to solution
11-17-2017 12:24 PM
JamalNUMAN
Legendary Contributor

ArcGIS Pro doesn’t label values as they appear in the table,

 

I couldn’t figure out why ArcGIS Pro doesn’t label values (attached) as they appear in the table.

 

What could be the issue here?

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
1 Solution

Accepted Solutions
Robert_LeClair
Esri Notable Contributor

Jamal - so I think your numeric field is based upon a DOUBLE.  What you see in the attribute table is numeric formatting of the DOUBLE but your label shows the unformatted number.  What you can do is build an Arcade expression such as:

round(number($feature.Percet_WestBank * 100), 2) + "%"

to get something like this:

View solution in original post

14 Replies
WendyHarrison
Esri Contributor

Hi,

Are you using the Arcade label expression parser?  Please see this help topic - Specify text for labels—ArcGIS Pro | ArcGIS Desktop 

When using Arcade, field formatting on the layer will not be brought over to the labels. Arcade formatting methods will need to be used.

To bring across the field formatting you will either need to use the Arcade formatting methods, or use a different expression parser for your labels.

thanks

Wendy

Robert_LeClair
Esri Notable Contributor

Jamal - so I think your numeric field is based upon a DOUBLE.  What you see in the attribute table is numeric formatting of the DOUBLE but your label shows the unformatted number.  What you can do is build an Arcade expression such as:

round(number($feature.Percet_WestBank * 100), 2) + "%"

to get something like this:

JamalNUMAN
Legendary Contributor

This works fine in ArcMap.

 

Having the “type” to be “double” and “category” as “percentage” works perfectly without the need to write any code. Simple. The data is attached

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
WendyHarrison
Esri Contributor

Hi Jamal,

Arcade doesn't exist in Arcmap.  Your labels will be using vbscript, jscript or python in your ArcMap project.  You can use those parsers in Pro as well - you just need to change it on the Label Class pane.  Arcade works differently than the other parsers which is why you would need to use the expression Robert provided. 

Take a look through the help topic I sent in the previous message for more information.

thanks

Wendy

XanderBakker
Esri Esteemed Contributor

Hi Jamal NUMAN ,

In addition to the links that Wendy Harrison  provided, I would like to share this great blog by Kelly Gerrow‌:

https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-disp... 

I have created some documents on Arcade too, and although the one below is for ArcGIS Online, it helps to understand what you are able to do with Arcade: Create pop-ups in ArcGIS Online with conditional images using Arcade 

ArcGIS Arcade | ArcGIS for Developers allows you to do things that are not possible with ArcMap. I understand that you are searching for a way to simply show the labels based on the format defined for a field in the attribute table and you can log an enhancement request, but it is also important to look beyond the possibilities that ArcMap offers and understand the potential of Arcade in ArcGIS Pro and ArcGIS Online (and soon available in many other parts of the platform).

AmyNewsam
Occasional Contributor

I'm having the same problem, and yes, using a label expression to round the number works, but the actual entered data only has 1 decimal place, so where do all these random decimal places come from?  (e.g., I entered the value 1.2 in a field formatted as a float with precision = 2 and scale = 1, but the label displays as "1.20000009056245")  It's kind of bizarre!

0 Kudos
HannahShepherd1
New Contributor II

Did you find your answer? Should be achievable in "Fields" (under Data, Design), double-click the three dots in the field

 

Make sure to hit "Save" in the new Fields tab (upper left), before closing the Fields window.

PS - I just ran through this as I was working on something completely irrelevant, so my measurements are now in percentages (which make no sense), but it's the proof of concept that matters.

JamalNUMAN
Legendary Contributor

This never works, Hanna.

 

The issue here that the percent sign does appear at the level of table but fails to do so when labeling them as shown in the screenshot below. This has been an easy and straightforward task in ArcMap

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
MichaelAugust
Occasional Contributor III

Why can't you just write the Pro label module such that the appropriate Arcade expression for the numerical properties of the field are generated, especially since Arcade is the default "landing" within the Label Class?  It's very confusing to be able to open the Fields table, make changes to the numeric properties of a field, see them change in the attribute table, but then not change on your labels. 

I wasted a bunch of time figuring this out and I'm sure others did too, I feel like you're just trying to push Arcade a little to hard by having the labeling default to it, rather than VB or Python, when it doesn't interact naturally with the numeric properties of a field...