Arcade Again (ArcPro) – Labels

Simple piece of code to show how to combine three fields with a condition set that should one of the fields be ‘null’ to change the entry.

Special Note: make sure to include the double ‘==’ entry.

iif ($feature.RA2 == null,$feature.COMP3 + $feature.COMP4, $feature.RA2+” – “+$feature.COMP3 + $feature.COMP4)

Using the iif statement you can compare between two conditions in this case when looking at the value RA2 within the feature class if the result is an empty field or ‘null’ it performs the first step of the operation or true in nature.

$feature.COMP3 + $feature.COMP4

Should the result be false or the field RA2 is populated then the false portion of the code is executed.

$feature.RA2+” – “+$feature.COMP3 + $feature.COMP4

Putting in to practice.