Labeling specific comments

292
1
05-16-2013 11:59 AM
LawrenceFujiwara
New Contributor III
I have polygons that I need to label. The expression it looks something like [shapefile.name]&vbnewline&[shapefile.comment]

However in the comment I have two values (A and B). I want to only display on map, comment value A and not comment value B.

Is there a way to achieve this? I tried the SQL Query but that gets rid of the entire labeling (I still want the name to show up even if the polygon has comment value B).

Thank you!
Tags (2)
0 Kudos
1 Reply
RichardFairhurst
MVP Honored Contributor
I have polygons that I need to label. The expression it looks something like [shapefile.name]&vbnewline&[shapefile.comment]

However in the comment I have two values (A and B). I want to only display on map, comment value A and not comment value B.

Is there a way to achieve this? I tried the SQL Query but that gets rid of the entire labeling (I still want the name to show up even if the polygon has comment value B).

Thank you!


Use the advanced label expression to set this up.  The expression would be designed using if then statements of either VBScript of Python to branch the label format according to the presence or absence of value A.

Label classes could also apply as a way to define two label configurations, with one class haing the SQL limit the set to those features that have value A and another label class to use the opposite SQL with a label configure for the absence of value A.

Typically the first choice works well enough for simple label configurations that only really involve string concatenation alternatives, while label classes usually are best for creating several very unique label formats for each label class group.
0 Kudos