I have a feature class being used in Data Driven Pages, which sorts as follows:
- APPLE LARRY
- JOHNSON SHIRLEY
- KENT-STATE-GOODS LLC
- KENT TIMOTHY
- KENT VANESSA
- KENT WAYNE
- SMITH JEEVES
I also have the Data Driven Pages run via a script, and because we don't yet have ESRI Production Mapping, table generation has to be done as part of this script. When this script runs, a Python list is created containing these names. My list parcelOwners[] is then sorted using parcelOwners.sort(), but I get a different sort order amongst the KENT's because of the hyphen. That sort order is as follows:
- APPLE LARRY
- JOHNSON SHIRLEY
- KENT TIMOTHY
- KENT VANESSA
- KENT WAYNE
- KENT-STATE-GOODS LLC
- SMITH JEEVES
As you could imagine, the difference in sort order causes problems when the tables generate for a given set of pages amongst the KENT names. Page 3 gets the table data intended for Page 4, 4 for 5, 5 for 6, and 6 for 3. Is there a way to change how Python sorts my list when it encounters hyphens to match how ArcMap sorts the same data?