Hi Matthew,assetFeatureClass is a string not a row object. That's why you're getting the error message when you try to do this:assetFeatureClass.Ditch_ID
What you really mean is row.Ditch_ID but you're using the variable named 'row' twice. That's where the confusion probably arises. You should avoid using the same variable name ('row') on the inside loop that you're trying to use from the outside loop--For example, you could change the inner loop to for rowC in rows:
That said, I don't think you really want a nested loop here. I believe you could use the Python zip function to loop through both at once. Here's an example of the zip function:>>> listA = ['FID', 'Shape', 'COVER', 'RECNO'] >>> listB = ['OID', 'Geometry', 'String'] >>> for a, b in zip( listA, listB): ... print "a: ", a ," b: ", b ... a: FID b: OID a: Shape b: Geometry a: COVER b: String
So your code would be something like:assetRows = arcpy.UpdateCursor(assetFeatureClass,"[Processed] <> 'Y'","","","") centerRows = arcpy.UpdateCursor(centerline) for assetrow, rowCenter in zip(assetRows, centerRows): centerRow.Ditch_ID = assetRow.Ditch_ID #etc...