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 - 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:
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!
Just to drop my 2 cents in here. I'm using ArcPro 2.5 currently, and this is still happening. In my layout legend, it was showing correctly, however, in my actual map, it was not. Thank you to Robert LeClair for the bit of coding help to get me past this minor, yet severely annoying issue.
Many thanks Craig for the input.
Then, for now, I’ll stick to the code provided by Robert in order to show the percent in the label
round(number($feature.AreaPercent_km * 100), 2) + "%"
With Python, VBScript, and JScript expressions, the field values always passed through the field formatting of the layer and were brought into the label expression as strings. While that achieved your desired effect in this case, it caused problems in other scenarios where some expected raw field values. It also caused problems for portability as cases like feature services, web maps, and feature-linked annotation lacked the layer formatting. For Arcade, we made a conscious decision to pass the feature itself into the expression with raw field values. This itself is quite powerful as it provides access to geometry and arithmetic operations can be performed on raw data values.
As Wendy Harrison noted above, we have documented the difference in behavior here from the very introduction of Arcade. In future releases, we'll be revisiting layer field formatting with the goal of greater portability and look at whether we can default Arcade expressions on field insert to match field formatting in appearance much like we do for coded value domains.
ArcGIS Pro 2.3 behaves the same as 2.3 when it comes to labelling. It doesn’t perform labelling according how values appear in the table
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).
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...
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
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.
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-display-with-arcade-in-pop-ups
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).
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
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
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.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.