BrianK

searchCursor, getValue, problem with joined tables

Discussion created by BrianK on Oct 5, 2011
Latest reply on Oct 5, 2011 by BrianK
Hi,

I get an error with the last statement below if the workingLayer is joined to another
table even if the field name is unique between the two (the statement below is what I would like to get our of the original layer).  I hope I'm just missing something simple.  Any suggestions?  thanks.

Brian Kaplan
Centers For Disease Control and Prevention



import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
fcs = arcpy.mapping.ListLayers(mxd)
workingLayer = fcs[11]
rows = arcpy.SearchCursor(workingLayer)
firstRow = rows.next()
strDQ = str(firstRow.getValue("OBJECTID"))

Outcomes