I tried to refer to the different table's fields just like I saw in How to Calculate Field in joined table using ArcPy? but it doesn't work.

There are two tables in my example. I have created table "c":

enter image description here

I generated a summarized table (called ttt) with right click on the field "helysz" and summarize. Then I added a field "hely", and copied the newly created "helysz" field's content into that, just for sure, for different field names. Then I added the ossz field to the second table "ttt". After this I linked the c's helysz field to the secondly created table's hely field. The table c's fields from the second OBJECTID field are from the linked table. They have appeared only after the linking. (ArcGIS shows the first one in this view).

This is the second table "ttt":

enter image description here

I wrote this ArcPy to go through the hely field with CalculateField_management and find those certain values from the original helysz field, then work with the values what are in one record with the found helysz.

ArcPy Code

The error message I get:

raise e arcgisscripting.ExecuteError: ERROR 000539: Invalid field D:/JAN17ALG/joo/Felsotarkany_energetika_kiserleti.gdb/c.helysz Failed to execute (CalculateField).

hely and helysz means the topographical number. And one topographical number can have more buildings. the data of the buildings would be the "c" table. the data of the topographical numbers (or fields what have multiple buildings) are in the "ttt" table.

Why this doesn't work?

closed as unclear what you're asking by PolyGeo Feb 9 '15 at 9:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Could you please include your Python code snippet within your question where it can be nicely formatted using the {} button. When you say "I linked the c's helysz field to the secondly created table's hely field", do you mean that you used ArcMap to apply a Join between them, or did you use the AddJoin tool, or something else? – PolyGeo Jan 23 '15 at 10:27

Most likely the issue that is causing the "invalid field" error happens during the join. When you join two tables togeather in Arc, the field name will change. The alias of each field will stay the same (example: ossz).

The actual field names however will change to a combined name based on the two table's names (example ossz.c)

Check the real names out, and you should be able to adjust the code accordingly to look for these names.

  • Uncheck "Show aliases" to see the combined names (tableName.fieldName) in the attribute table. – gm70560 Jan 23 '15 at 21:45

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