Select to view content in your preferred language

Exclude null symbology from labelling with label expressions

169
3
Jump to solution
3 weeks ago
Labels (3)
NormanCone
New Contributor

I'm working on creating a map and I only need to display the labels for the polygons that have symbology. There are other polygons that are not relevant to this project so I removed their symbology so they aren't displayed. I also want to remove the unit number labels for the polygons that are not represented. 

 

I feel that this would be a fairly easy expression to make in the label properties expression, but I don't have a background in python or arcade. I thought the conditional if-else statement could work, but I couldn't figure it out. 

 

Any help would be appreciated. I would like to learn more about python and arcade coding in Arcgis pro. 

 

Thanks, 

0 Kudos
1 Solution

Accepted Solutions
ZachBodenner
MVP Regular Contributor

How exactly do you determine if the polygon is irrelevant and therefore removed? Is it if the prescription field is anything other than "Old Growth..." or "Shaded Fuel..." ?

In Pro, you can use a command Create Label Classes from Symbology:

ZachBodenner_0-1746118198291.png

 

This will automatically create SQL queries that match your symbology if you're using Unique Values.

Happy mapping,
- Zach

View solution in original post

3 Replies
ZachBodenner
MVP Regular Contributor

How exactly do you determine if the polygon is irrelevant and therefore removed? Is it if the prescription field is anything other than "Old Growth..." or "Shaded Fuel..." ?

In Pro, you can use a command Create Label Classes from Symbology:

ZachBodenner_0-1746118198291.png

 

This will automatically create SQL queries that match your symbology if you're using Unique Values.

Happy mapping,
- Zach
NormanCone
New Contributor

Thank you Zach. Using the create label classes from symbology to create distinct labels for each treatment works perfectly. I am creating a map for my marking crew, and this will let me clean-up my may by removing those unnecessary labels. The other symbol class is mastication, and those units don't have to be marked so I don't need to include it in my map. Those polygons will be addressed in a separate contract, but I didn't want to create a separate polygon layer because things can get disorganized quickly. 

@BrendanNewell  The definition queries tool is very useful and I could consider it here, but for a small data set like this one it's not necessary. I appreciate your tips. 

0 Kudos
BrendanNewell
Esri Contributor

hi @NormanCone, a alterative workflow here is too look at creating a subset of your data with definition queries or  selection layers. As both these tools will created new layers that only show the features of interest and will provide a much more simple and robust workflow.

 

🙂
0 Kudos