Select to view content in your preferred language

Label Expression Question

1342
5
Jump to solution
08-29-2016 03:41 PM
PROBERT68
Honored Contributor

I need to write a script within the Fire Protection Districts layer in the Label Manager to remove the label that  has all the labels for each polygon with their names like this: . Alamosa County Fire Protection District. What I would like is to remove the "Fire Protection District" because the map I am going to create is to be about  the Fire Protection Districts . They do not need to duplicate twice..

So here is the example I want to display just Alamosa County only and remove the Fire Protection District

How do I do that ?

0 Kudos
1 Solution

Accepted Solutions
AbdullahAnter
Honored Contributor

Write this expression 

VB :            Replace([Field Name],"Fire Protection District","")

Python:       !%Field Name%!.replace("Fire Protection District","")

That will remove " Fire Protection District"  from label.

View solution in original post

5 Replies
DanPatterson_Retired
MVP Emeritus

what version of Arcmap?  that dialog looks like an older version or is that in maplex or something?

0 Kudos
PROBERT68
Honored Contributor

no, ArcGIS Desktop 10.3.1 under Citrix.

0 Kudos
AbdullahAnter
Honored Contributor

Write this expression 

VB :            Replace([Field Name],"Fire Protection District","")

Python:       !%Field Name%!.replace("Fire Protection District","")

That will remove " Fire Protection District"  from label.

PROBERT68
Honored Contributor

Thank you. That worked !

DanPatterson_Retired
MVP Emeritus

moved to https://community.esri.com/community/gis/mapping?sr=search&searchId=9fb7db35-e446-4a4a-8480-7351c3cb...‌  try to direct mapping style questions there ... the GIS place is a cavernous pit where questions get dumped as a last resort