Remove characters in a label expression - Pro 3.01

1442
3
09-22-2022 02:15 PM
KeithAddison1
Occasional Contributor III

I'm trying to strip the first 10 characters from a field in a label expression using Python, how can I do this?  The syntax must be different because what works in field calculator doesn't work in the label expression.  Why can't they be harmonized?

3 Replies
jcarlson
MVP Esteemed Contributor

What is the expression you're attempting to use? It would be good to be able to replicate the same thing for testing.

- Josh Carlson
Kendall County GIS
0 Kudos
KeithAddison1
Occasional Contributor III

[FIELD][9:] , [FIELD](9:) , [FIELD]{9:} ,etc etc etc

What character am supposed to use in lieu of what works in field calculator: !FIELD![9:] ?  Is there a singular source where I can find a rundown of all the differences between Python is field calculator and Python in the label expression?  The subtle differences in syntax trip me up frequently.

BarryNorthey
Occasional Contributor III

Try this -  be sure to check on Advanced

BarryNorthey_0-1663903134326.png