I have merged numerous datasets that have the same attributes in different fields. I have TotalAcres, Total_Acres_Burned, TTL_ACRS, etc... I am trying to use field calculator to populate one field (TotalAcres) with all the acres values from the varying fields.
Using ArcMap 10.4.1 and python as parser.
Here is my code
def updateAcres ( TTL_ACRES, TotalAcres, ContrAcres, FIRE_SIZE, Field9,
Total_Acres_Burned):
if TTL_Acres > 0:
TotalAcres = TTL_Acres
elif ContrAcres > 0:
TotalAcres = ContrAcres
elif FIRE_SIZE > 0:
TotalAcres = FIRE_SIZE
elif Field9 > 0:
TotalAcres = Field9
elif Total_Acres_Burned > 0:
TotalAcres = Total_Acres_Burned
else:
return TotalAcres
Then my CodeBlock is: TotalAcres= !TotalAcres!
It runs without throwing an error but it does not populate TotalAcres with the value from any of the other Acres fields.
Any ideas?


