SaultDon

Replace function in Label Expression v10

Discussion created by SaultDon on Jul 6, 2011
Latest reply on Apr 16, 2020 by littledroog
I am trying to remove the word "HIGHWAY " (including the space) from my label using the vbscript replace function.

Function FindLabel ( [Road_Name] )
  NewString = Replace([Road_Name], "HIGHWAY ", "")
  FindLabel = NewString
End Function


Gives me the following error:
[ATTACH]7623[/ATTACH]

I have tried the example from the Building Label Expressions help and also went over this similar thread but I thought I already stored it as a string (NewString)?

I'm not sure what is wrong as it worked in 9.3.1
I am now using ArcGIS 10 SP1.

The layer that I am trying to label does have a definition query if that helps...

Attachments

Outcomes