Is This Content Helpful?
We're glad to know this article was helpful.
The label expression dialog in ArcMap does not respect the exact standards of Python syntax. When trying to insert a quotation mark (") using an escape character, (for example "\""), an invalid expression error is returned. To get around this limitation and insert a quotation mark into a label, perform the following procedure.
Use the Unicode character '\x22' in place of the quotation mark, as shown in the following two examples:
Simple label expression:
[Label] + '\x22'
def FindLabel ( [Label] ):
return [Label] + '\x22'