Created
March 13, 2017 15:09
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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