First things first... read thisthread and put code tags around your script.Like so:cur = arcpy.UpdateCursor(FC)
for row in cur:
try:
fieldVal = row.getValue(fieldOne)
if fieldVal = xxxxxxx:
value =
row.setValue(newField, value)
A few issues:
- a try: statement must have an except: clause
- equality tests use "==" not "="
- "value =" needs a value or it will cause a syntax error, i.e. value = "something"
E.g.cur = arcpy.UpdateCursor(FC)
for row in cur:
try:
fieldVal = row.getValue(fieldOne)
if fieldVal == xxxxxxx:
value = row.setValue(newField, value)
except Exception as err:
Do something useful here or don't use try except at all
For any more assistance you need to give us more info - are you calculating for each of the 2 tables separately, are they joined, do you have to get the value for "newField" from another field in the table/s, etc...?