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

3558
13
Jump to solution
11-17-2017 12:24 PM
Highlighted
Honored 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?

1 Solution

Accepted Solutions
Highlighted
Esri Frequent 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

13 Replies
Highlighted
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

Highlighted
Esri Frequent 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

Highlighted
Honored 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

Highlighted
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

Highlighted
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).

Highlighted
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.

Highlighted
Honored 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

Highlighted
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...

Highlighted
Honored Contributor

This is how it has been working since ages in ArcMap and I see it much more logic that what we have now in the Pro. I hope that developers will consider this in their upcoming releases (I know that you will be saying that Pro is not ArcMap).