I have a feature class with a number of fields, two of wich are key fields, named key and front, and secondary fields named key_n and front_n.
The thing is I need to search in the whole table for any instances of key values where the front equals the front_n value (key+front = key+front_n), as the basis for calculating the key_n value.
I have tried with arcpy.da.UpdateCursor, but haven't got it, since, to my view, the arcpy.da.UpdateCursor compares only values within the current row, and the provided examples with ArcGis don't explore this possibility.
This is the code I've gotten lately, to no success. In this case, the fields cvegeo and cveft are to be searched as a match to cvegeo + cveref1, in which case, the cvevial1 and cveseg1 fields are to be carried from the record where cvegeo+cveft are taken originaly.
import arcpy import sys frentes = arcpy.GetParameterAsText(0) #frentes = arcpy.GetParameterAsText(1) campos = ('CVEGEO', 'CVEFT', 'CVEVIAL', 'CVESEG', 'CVEGEO_N', 'CVEFT_N', 'CVEVIAL_N', 'CVESEG_N', 'CVEREF1', 'CVEVIAL1', 'CVESEG1', 'CVEREF2', 'CVEVIAL2', 'CVESEG2', 'CVEREF1_N', 'CVEVIAL1_N', 'CVESEG1_N', 'CVEREF2_N', 'CVEVIAL2_N', 'CVESEG2_N', 'PRUEBA') with arcpy.da.SearchCursor(frentes, campos) as scursor: for row in scursor: abuscar = row frente = row clave_vial = row clave_seg =  with arcpy.da.UpdateCursor(frentes, campos) as ucursor: for urow in ucursor: if (urow == abuscar and urow == frente): urow = clave_vial urow = clave_seg ucursor.updateRow(urow)