AnsweredAssumed Answered

Cursor if/then statements

Question asked by qvt2_pdxedu on Jan 15, 2020
Latest reply on Jan 15, 2020 by bixb0012

Hi, I am trying to search through a dataset to find a certain value in a certain field in order to update another field in that same row, but I can't quite seem to make the code snippet work. Can somebody tell me what I'm doing wrong? The below code completes just fine but returns nothing. 


import arcpy

arcpy.env.workspace = r"C:\Users\paperspace\Google Drive\QTA\19010_PDX Zoning\PDXZoning\PDX_Kerns.gdb"

fieldNames = ['TLID', 'RNO']
tlidList = arcpy.da.SearchCursor("taxlots_Kerns", fieldNames)

for tlids in tlidList:
    string = "*-STR*"
    if tlids[1] == string:

I can't tell if I'm using the wildcard incorrectly, the comparison incorrectly, or if there's something else I'm doing wrong. Thanks,