I am hoping that someone may be able to help me. I am new to ArcGIS, and even newer to Python.
Working in ArcGIS 10.1, I have done is created a new text field in an attribute table, which I have called "Ag". I want to populate this field with the text from another field (called Address) which is in the same attribute table BUT only if that text starts with the word "Field".
I have written the following function but it is not working, and I am not sure where I have gone wrong, or if I am on the wrong path completely.
def Reclass(agri): if (!Address!.startswith("Field")): return !Address! else: return "NA"
I have searched the forums and the ESRI documentation for a solution, but cannot seem to find what I am looking for. I hope that I have given all the relevant information for someone to be able to help me with my conundrum, but please let me know if there is more (or better) information I should supply.
Many thanks in advance!