Skip to content

Instantly share code, notes, and snippets.

@HerbFargus
Created March 13, 2017 15:09
Show Gist options
  • Save HerbFargus/c46b1d00f20347879e34cdb0a154aff1 to your computer and use it in GitHub Desktop.
Save HerbFargus/c46b1d00f20347879e34cdb0a154aff1 to your computer and use it in GitHub Desktop.
Arcmap Field Calculator (Python): Conditional If Then statement if a field is NULL
#Pre-Logic Script Code:
def calculate(f1, f2):
if f2 == None:
return f1
else:
return f1 + f2
#Field =
calculate( !FIELD1!, !FIELD2! )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment