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.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.