Thanks that worked great.. I know I should post this in a new thread but was hoping for a quick answer. I'm trying to join 2 fields. the corridor field and the RM field. I was thinking it would look something like this but cant seem to figure it out. .join(!Corridor! + !RM!)
You can perform this in the field calculator. Make sure you have 'Python' at the top of the field calculator checked and then the syntax would be:
!Corridor! + !RM!
I tried that and it won’t work.. Not sure if it has something to do with it being a text field..
If you are calculating into a TEXT field, and on of the fields is an integer, try the following:
str(!Corridor!) + str(!RM!)
If not, let me know what type of fields Corridor, RM, and the field you are calculating to are.
Or try this tip
That worked but it adds a .0 to the end of the RM.. I created the RM field as a short with 0 decimal places. So it returned C000001E156.0. The precision is set to 4
I got it.. Thanks for your help./. Have a good weekend..
I'm trying to join 2 fields. the corridor field and the RM field. Calculate Field (PYTHON) str(!CORRIDOR!) + str(!RM!) worked but it adds a .0 to the end of the RM.. I created the RM field as a short with 0 decimal places. So it returned C000001E156.0. The precision is set to 4
Try this Calculate Field syntax
arcpy.CalculateField_management(tbl, field, "{}{:.0f}".format(!CORRIDOR!, !RM!), "", "PYTHON_9.3")