Trying to calculate a field within a model builder process, and I am getting returns I was not expecting. I am trying to have the Null values calculated as 0s (Number field). Now, the non-Null values are being calculated to 0s and leaving the Null values.
Solved! Go to Solution.
Hello Matt,
You probably need to add an else in there and check for the field equals <null>. Something like:
expression:
nullfill(!FREQUENCY!)
codeblock:
def nullfill(value): if value == None: return 0 else: return value
Hello Matt,
You probably need to add an else in there and check for the field equals <null>. Something like:
expression:
nullfill(!FREQUENCY!)
codeblock:
def nullfill(value): if value == None: return 0 else: return value
That did the trick! Thank you for the help.