Select to view content in your preferred language

How to slice a word in the label expression

3281
10
Jump to solution
12-07-2016 12:23 PM
PeterVersteeg
Frequent Contributor

Hallo,

I have a field with city names and I want to slice the name in the label expression to only the 1st character.

I want to do this in python. looking at the internet i have this but it is not working:

def Label ( [CityName] 😞

     s = [CityName]

     s1 = s[1:]

     return s1

i am working with arcgis for desktop 10.3.1

greetings Peter

0 Kudos
10 Replies
JoeBorgione
MVP Emeritus

Error trapping is as much an art as it is a  science .   

That should just about do it....
0 Kudos