Select to view content in your preferred language

How to Label based on "Label" value in Symbology Window

2206
3
Jump to solution
08-24-2022 04:55 AM
hherrmann_coj
Occasional Contributor

Hello all.   I am trying to label some polygon features based on the label value in the symbology window and not the "value" field but despite my attempts at changing settings in between maplex and standard label option, I have been unable to resolve the issue.  I'm still kind of newish to Pro so there is definitely a learning curve.  I like how ArcMap automatically labels by that "label" value from the symbology window or even how they are manually typed in the table of contents.

WNW9Hujc2l.png

Side note: Pro seems to require WAYYYYY more clicks and hunting to do tasks that are way, way simpler and faster in ArcMap.  I know ArcMap is going to be obsolete soon so I'm trying to force myself to use Pro but dang, I wish ESRI would consider some of the clunky-ness in Pro 9 (and AGOL for that matter).  I know they want everything "pretty" but functionality is much more important in my humble opinion.  It has a lot a really great features but for people like me that are speed workers, Pro can be such a pain in the tukus. 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Where are your "label" values coming from? Do you have an actual domain on the field, or are these just manually configured aliases? Domains are a good idea for coded values for lots of other reasons, but easy labeling is the relevant thing here. When labeling a field with a domain, Pro automatically inserts the description, rather than the code. I'm sure ArcMap did the same, but I haven't used ArcMap in many years, and I don't recall.

Suppose you have manually configured aliases instead of a domain, it would be nice to be able to translate your symbology directly over to labels without much fuss. There is a method of converting symbology classes to label classes, of course:

jcarlson_0-1661344203292.png

jcarlson_1-1661344216218.png

Which is nice for certain situations, but then each label class has to be manually configured, which might be more work than just writing a decent label expression in Arcade. If you used a Where or a Decode, you could actually have the same expression being used for both symbology and labelling, and you could just copy and paste the expression in each.

var adhoc_domain = {
    'inst': 'Institutional',
    'hdr': 'High Density Residential',
    'mdr': 'Medium Density Residential'
    // and so on
}

return adhoc_domain[$feature['FLU_1']]

In general though, if there's a value or alias that's going to be useful in more than one spot, it ought to be in the data either as a field or a domain. Relying on ad-hoc definitions and typing your labels in seems like it would take up more of your time.

Re: your side note.

User experience and feedback is critical to actually making the software better. In my experience, the development teams have been incredibly responsive to my feedback, even implementing some of my suggestions within a version or two. But in order for your feedback to mean anything, you've got to put it in the right place. Check out the Ideas boards on here, and make your feedback count!

As I'm sure you're aware, you're far from the only user who is not finding the ArcMap -> ArcGIS Pro transition a bit rough. While development tends to focus on the leading edge of shiny new things, making sure that a big chunk of their user base doesn't get "eft behind is important, too, so the particular feedback you can provide as a longtime ArcMap user is really valuable!

- Josh Carlson
Kendall County GIS

View solution in original post

3 Replies
jcarlson
MVP Esteemed Contributor

Where are your "label" values coming from? Do you have an actual domain on the field, or are these just manually configured aliases? Domains are a good idea for coded values for lots of other reasons, but easy labeling is the relevant thing here. When labeling a field with a domain, Pro automatically inserts the description, rather than the code. I'm sure ArcMap did the same, but I haven't used ArcMap in many years, and I don't recall.

Suppose you have manually configured aliases instead of a domain, it would be nice to be able to translate your symbology directly over to labels without much fuss. There is a method of converting symbology classes to label classes, of course:

jcarlson_0-1661344203292.png

jcarlson_1-1661344216218.png

Which is nice for certain situations, but then each label class has to be manually configured, which might be more work than just writing a decent label expression in Arcade. If you used a Where or a Decode, you could actually have the same expression being used for both symbology and labelling, and you could just copy and paste the expression in each.

var adhoc_domain = {
    'inst': 'Institutional',
    'hdr': 'High Density Residential',
    'mdr': 'Medium Density Residential'
    // and so on
}

return adhoc_domain[$feature['FLU_1']]

In general though, if there's a value or alias that's going to be useful in more than one spot, it ought to be in the data either as a field or a domain. Relying on ad-hoc definitions and typing your labels in seems like it would take up more of your time.

Re: your side note.

User experience and feedback is critical to actually making the software better. In my experience, the development teams have been incredibly responsive to my feedback, even implementing some of my suggestions within a version or two. But in order for your feedback to mean anything, you've got to put it in the right place. Check out the Ideas boards on here, and make your feedback count!

As I'm sure you're aware, you're far from the only user who is not finding the ArcMap -> ArcGIS Pro transition a bit rough. While development tends to focus on the leading edge of shiny new things, making sure that a big chunk of their user base doesn't get "eft behind is important, too, so the particular feedback you can provide as a longtime ArcMap user is really valuable!

- Josh Carlson
Kendall County GIS
hherrmann_coj
Occasional Contributor

Yeah, I get so frustrated when working with badly planned data.  The field containing the acronyms for what the actual future land use type is an 8 character text field.  I plan to add either a domain field or a field with the actual type of FLU so it'll be easier for labeling when I get a chance to kick everyone out of our database.  Locks are locks, ya know?  

Thank you so much for your feedback!  I was able to use your expression example and get the labeling that I wanted.  I am brand spanking new to Arcade and really need to start trying to use it more.  I've not ever been more than a simple statement writer so I guess I better get practicing.  😋    

I will definitely make a post in the ideas board.  I always just think about it but never do, thinking someone else has probably posted the same things I would post.  

Thanks again!  I really do appreciate your help with this!  🙂

jcarlson
MVP Esteemed Contributor

Locks are locks, indeed! Time for some late night db admin!

- Josh Carlson
Kendall County GIS