I want the ZONE_DESC unit to be Agricultural 10 Acres if the ZONE unit is A-10. This is just the first part of the script. Later I will add if, elseif, and then statements to complete the script to assign the rest of the units of the ZONE_DESC field. when I run this portion of the script I get error messages. Am I close or I am way off?
try using a double equals:
f1 == "A-10"
a single = sign means you are trying to assign that value to the variable
Your image shows that the parser is set to VB Script, which means it is expecting to read VB Script. Since you've written Python, change the parser to Python.
Also, you need to indent everything under the def statement.
formatting issues...not checking logic issues
def calc(f1):
if f1 == "A-10":
a = "Agricultural 10 Acres"
elif f1 == "something else":
a = "not"
else:
a = "still not"
return a
or in the field calculator (untested)
"Agricultural 10 Acres" if !Zone! == "A-10" else "False"