I am having some difficulties to change "NULL" values to zero in geodatabase. I have tried the following python code in ArcGIS 10.1 ("Field Calculator") to change it but did not work.
Pre-Logic Script Code:
def RemoveNULL(x):
if x is None:
return ''
elif x == '':
return '0'
else: return x
Calculation field:
RemoveNULL(str( !DEAD_VOL_PER_HA_SPP1_125!))
Error message:
ERROR: 999999: Error executing function
The value type is incompatible with the field type. [dead_pine]
Failed to execute (calculate field)
return''
. What do you want to return? – Aaron♦ Oct 8 '14 at 19:57