1

I need to do some analysis in ArcGIS, export the data to Excel, do some more analysis, import the results back to ArcGIS, and join the resulting table back to one of the original feature classes. Am I right that it's not a good idea to use the OBJECTID field for this, as the data, when imported from Excel to table, will get OBJECTIDs of their own? The data is on census blocks, which have 15-digit IDs. I tried stripping off the state and county codes to make them 10-digit, but even then, the numbers are too high for the DOUBLE field type. (From Excel, the data will be exported to SAS, where the IDs will need to stay in the same matrix with other data, so they need to be numeric.)

If OBJECTIDs won't work and census block IDs are too long or too high, can I create my own numeric unique ID? There is a triple-digit number of blocks in my study area, so I guess a 3-digit (or 4-digit, just in case) ID should be enough. Can I, in ModelBuilder, create a unique numeric ID field that stays unchanged when the table is exported, imported back into ArcGIS, etc.? In other words, just another numeric attribute?

2

You're right that using the OBJECTID isn't a good idea, it might change when the data is copied/exported/imported etc.

A simple solution is to add a field and copy the OBJECTID to it.

See also this technical article from Esri to create sequential numbers in a field using Python in the Field Calculator.

  • Thanks! I tried the code in the how-to link you suggested, and it worked. – Mhoram Jul 5 '16 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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