ArcGIS has a confusing method for updating field names when combining tables with duplicate field names. For example, I have two tables containing the field Id
.
If I run JoinField_management
, joining Id
with key field OBJECTID
the new field is Id_1
.
One would suspect that should the process repeat the field would be added with field name Id_2
. However, this is not the case. Instead the field is added as ID_12
.
Repeat the process dozens of times and the field name logic gets more complex.
If a field name length is 64 the count adds one as one would expect.
Another note: ID_4
becomes ID_45
, then ID_45_46
, ID_45_46_47
, etc.
Question: What is the programmatic logic used to determine field names from geoprocessing when duplicate fields are present?
Id
andId_1
? I'd really like to have a function with the same logic esri uses for their field naming.