Last active
March 8, 2017 22:09
-
-
Save HerbFargus/cf9d6e09f5d25d2a703f0cc871ad1f4b to your computer and use it in GitHub Desktop.
Arcmap Field Calculator (Python): Concatenate values from fields that are not 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 concat_fields(field1, field2, field3, field4): | |
if field1.strip() == "" or field2.strip() == "" or field3.strip() == "" or field4.strip() == "": | |
return "" | |
else: | |
return field1 + "/" + field2 + "/" + field3 + " " + field4 | |
#FIELD= | |
concat_fields( !Field1!, !Field2!, !Field3!, !Field4!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment