Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Calculate value in a joined table

$
0
0
Hi,
I've to calculate a field based on another field in a joined table, but an error occurs:

"Parameters are not valid.
ERROR 000728: Field !Table_A.field_A! does not exist within table"


Code:

import arcpy
from arcpy import env
env.workspace = "C:/TMP/BASELINE.gdb"
Table_A = "dist"
Table_B= "matrix"
arcpy.AddJoin_management(Table_A, "id_grid", Table_B, "id_matrix")
arcpy.CalculateField_management(Table_A, "!" + Table_A + ".field_A!", "!" + Table_B + ".field_B!","PYTHON")

Both tables are in the BASELINE.gdb. The Join occurs without any problem.

Please, any help appreciated.
Thanks in advance

Viewing all articles
Browse latest Browse all 2485

Trending Articles