ArcPad Label Expression: split function?

1196
2
03-15-2011 01:43 PM
MarcEylar
New Contributor
I am trying to figure out how to write a label expression that will split an address for me. 

For example, the address pulled from the "SITUS" field is 209\Benton Street Ellensburg, and I would like it labeled as just 209.

Simple code I am sure, but need some assistance.  Any help is greatly appreciated.

Thanks,

Marc
Tags (3)
0 Kudos
2 Replies
riyhen
by
New Contributor II
Hi,

you would use this expression :
left([situs],instr([situs],"\")-1)

go to the layer properties ->  labels tab , and in the "Labels using the Expression" type the previous expression in it ,,

hope that does it

the instr function gives the position of a text string within another , and the left function extracts a string from another one

riyhen
0 Kudos
MarcEylar
New Contributor
Thanks riyhen!  Simple and works great.

Marc
0 Kudos