AnsweredAssumed Answered

update an attribute if record found in a query

Question asked by matt.walker@cartopac.com on Apr 28, 2014
Latest reply on Apr 30, 2014 by matt.walker@cartopac.com
I am trying to update an attribute in one table, if that record is found in a MakeQuery table (I made a table view of all records not yet processed, and once processed, I want to turn the 'Processed' flag to 'Y').

rows = arcpy.UpdateCursor("Assets") for row in rows:  if row.Processed == "N" and row.Asset_ID == "Asset_Unprocessed.Asset_ID":   row.Processed = "Y"   rows.updateRow(row) del row del rows


I am trying to update in the Assets table the 'Processed' flag to 'Y', IF the Assets key is found in the 'Assets_Unprocessed' table.  This does not throw an error, it just does not find and update my test data properly.  The issue is the comparison to the Assets_Unprocessed table (the rest of the code works), and I've tried several different ways to type that table (full path, brackets, etc.) and can't seem to get that part to work.

Outcomes