Referencing attributes in a script

Discussion created by jenabbott on Oct 17, 2013
Latest reply on Oct 24, 2013 by thanos_cp78
Good morning,

I am trying to automate my map so that every time I make a new map the property number changes according to the attribute table. I have figured out how to do this (thanks to this forum), but I can only make it happen with one shapefile. The dataset I'm working out of has many shapefiles which I need to reference some of these. My script is as follows;

import arcpy
elemlist=arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENTS","Sub Title")[0]
elemlist.text="Recreational Lease" + "\n" + "Property No:" + row.getValue("PROPERTY")

I know it has something to do with the [0] as the object being referenced, but I'm not sure how to reference other items in the attribute table? I've tried creating a list, but that doesn't seem to be working....Can someone please help me???