0

My problem is that the code is adding numbers to the field names, and this is incorrect.

Problem:

Field should be names VALUE_122, but after running JoinField code, it becomes VALUES_122_123. The values inside are correct.

I have manually gone over the code for the join field, and it does not contain the numbers 123 anywhere.Interestingly, VALUE_123 is not a field in anyone of the 2 tables involved in the joining.

I am using ArcMap 10.1

3
  • 1
    It's probably because you have two fields named VALUE_122.
    – Paul
    Commented Sep 16, 2015 at 0:21
  • Just wanted to make sure it's not a problem of having qualified field names enabled e.g. TableName1.FieldName1. I suspect @Paul is right, Both tables have a field called VALUE_122, so when you join them, one field gets renamed something else. Field names are validated internally each time a new field is added in the user interface.
    – John
    Commented Sep 16, 2015 at 12:01
  • I agree with Paul. To elaborate, you likely have VALUE_122 in the target and source layers of your join. I have seen this many times. Commented Sep 16, 2015 at 16:50

1 Answer 1

1

The problem is that the field in question appears in both the tables. Possible fix is to copy one of the fields, re-name and then delete original field. Can confirm that I was unable to find the setting for the Qualified Field Names, and it did nothing in the script.

1
  • 1
    In the menu Geoprocessing > Environment Settings > Fields is a checkbox to maintain fully qualified field names. This can also be accessed in python via arcpy.env.qualifiedFieldNames = True.
    – recurvata
    Commented Sep 16, 2015 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.