My level is very basic in Python.
This is the python codeblock I have in ArcGIS Field Calculator:
def Reclass(THLB):
if THLB == 0:
return 0
elif THLB == 1:
return !Shape_Area!
This works fine if I have another value for elif..say 1. The field populates great. But I can't get the elif to return another field (area in this case).
What am I overlooking?
Both the shape area and field I'm populating are floats.
!name!
syntax is not standard Python. It's some whacko ESRI customization, so don't be surprised if it behaves in remarkably strange ways.