SearchCursor and aliasName

Discussion created by vki on Nov 22, 2011
Latest reply on Nov 23, 2011 by vki
I have a featureclass, that I have created by joining a featureclass and a table and saving the result as a new featureclass. The join-field was a field called "ObjectNumber".
Now I want to loop through this featureclass with a searchcursor, until I find the row with a certain number in the field "ObjectNumber".

My problem now is, that a field with the name "ObjectNumber" does not exist, only one with an aliasName "ObjectNumber". The real name is composed of the name of the original-featureclass (before the join) + underscore + "ObjectNumber".

I could concat the real name of the field in a variable, but how can I assign this variable and use it?

var_field_name = table + "_" + "ObjectNumber"

for ObjRow in ObjCur:
      if ObjRow.var_field_name== number:

Thanks in advance.