Select to view content in your preferred language

Use Replace in an VBScript in Label Expression for two different name in the same field ?

104
2
Jump to solution
Wednesday
PROBERT68
Honored Contributor

Here I have a question about the Label Expression I am working on.

I want to replace two CO- and E- with "" , but not sure HOW do I do for this method in the label expression.

The field name I have is an Alias which is all the route names and when I look at the attributes table and found two that I wanted to replace with . 

The first one I use the replace with worked but not sure for the second one..

Replace([ALIAS],"CO-","")

 

How do I add one more for the "E-" and replace with "" ? 

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

You can use the results of the first Replace in a second Replace

Replace(Replace([ALIAS],"CO-",""),"E-","")

 

View solution in original post

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

You can use the results of the first Replace in a second Replace

Replace(Replace([ALIAS],"CO-",""),"E-","")

 

0 Kudos
PROBERT68
Honored Contributor

Thank you !  That worked !

0 Kudos