I think you need to use getValue and setValue to work with field names as variables (not sure though).
rows = arcpy.UpdateCursor(filename) fields = arcpy.ListFields(filename) for row in rows: for field in fields: value = row.getValue(field) if value == x: row.setValue(field,y) rows.updateRow(row)
Inside your SearchCursor loop, you should be able to loop through each field (or limit to string fields) with ListFields to test the value against your string. I have no idea if this is the fastest method or not.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.