Hello,
Is there a way to label features in Mixed Cases when the data originally in all CAPS?
Original attribute table:
Currently, under Label Expression, I have:
"DISTRICT "& [DISTRICT] & vbnewline & [SUPERVISOR]
But I would like the label to look like this:
Any idea please?
Thank you very much!
Emily
Solved! Go to Solution.
In the Label Expression, change the Parser to Python, and use the expression [Name].title() - if your field is called "Name".
In the Label Expression, change the Parser to Python, and use the expression [Name].title() - if your field is called "Name".
Darren:
I am sure you meant to use exclamation marks for the field delimiters with the Python Parser and not brackets, which are used with the VB Parser. So if the field is called "Name", the expression should instead be:
!Name!.title()
Capitalization will happen only for the first character at the beginning of the field and for the first alpha character that follows any white space, numbers, punctuation or special characters. So you have to check for things like numbered streets which will appear as "1St Street" to make it "1st Street". Also, no alpha characters of a word other than the first one will be capitalized, so you have to check for things like Scottish last names beginning with Mc to change "Mcdonald" to "McDonald". Also it capitalizes all words, including small words that normally are not capitalized in book titles like "a", "an", and "the".
No, the label expression dialog does it differently than the field calculator (convenient...). !Name!.title() results in an error.
You are correct. I never do this with the label expression and only use the field calculator since I always want to correct the items I noted in my amended response, but a label expression works for the data in this case.
Thank you both Darren and Rich!