Adding Character to Text Field using Field Calculator

82
1
Jump to solution
2 weeks ago
KWallin
New Contributor

ArcMap 10.7.1  New to using scripting to help with adjusting formats and require an assist with my syntax. I tried to bring an excel already formatted, but looks like I need to save as DBF4, and this is not available to me.  I'm working with APN numbers, and it would be helpful for them to be formatted ###-###-###.  They are currently in field PARCEL_APN as #########.  

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Honored Contributor

use Excel To Table (Conversion)—ArcMap | Documentation (arcgis.com)

and see if it comes in properly as a text field.

If that doesn't work, you may need to do a field calculation in a text field using something similar to

(replace  "a" with he field 

"{}-{}-{}".format(!a![:3], !a![3:6], !a![6:])

... sort of retired...

View solution in original post

1 Reply
DanPatterson
MVP Honored Contributor

use Excel To Table (Conversion)—ArcMap | Documentation (arcgis.com)

and see if it comes in properly as a text field.

If that doesn't work, you may need to do a field calculation in a text field using something similar to

(replace  "a" with he field 

"{}-{}-{}".format(!a![:3], !a![3:6], !a![6:])

... sort of retired...

View solution in original post