menezesr

Parsing values throw cursors

Discussion created by menezesr on Aug 5, 2011
Latest reply on Aug 5, 2011 by menezesr
Hello everyone

I???m new to python and I???m having some troubles. I wonder if you can help me.

I have a featureclass and a table. I want to use in an Expression for the searchcursor a the objectid selected in the fc. Im tring to get the values of the table related to the feature class using an Id.

I???m trying something like this:


import arcpy

fc="C:/GISTEMP/TEST.gdb/PARCELA"
tb="C:/GISTEMP/TEST.gdb/TABLE"

scurfc=arcpy.SearchCursor(fc)
for sf in scurf:
    id=sf.getValue("OBJECTID")

scurtb=arcpy.SearchCursor(tb,'"ID" like id')
for sf in scurf:
    ???
    ???


I???m having trouble setting the expression that will work on the cursor.

Thanks

Outcomes