I have 3 attribute fields that I would like to label from: ex> Field,1 Field2, and Field3. Field1 is the main attribute field with most the data so that is the main attribute to label. In some cases Field1 is Null and if that is the case then label from Field2. In some cases both Field1 and Field2 are Null, then I would like to label from field 3. I do not want to label from all three at the same time. I am looking for a labeling expression to allow me to do this. Thanks
Solved! Go to Solution.
Here's a way to do that using Arcade, returning the first field that isn't null.
When(!IsEmpty($feature.field), $feature.field,
!IsEmpty($feature.field1), $feature.field1,
!IsEmpty($feature.field2), $feature.field2,
"No attributes");
thanks Ken, it worked great.
May be use if else with IsEmpty() function or == null to see whether the variable is null via Arcade?
Here's a way to do that using Arcade, returning the first field that isn't null.
When(!IsEmpty($feature.field), $feature.field,
!IsEmpty($feature.field1), $feature.field1,
!IsEmpty($feature.field2), $feature.field2,
"No attributes");
thanks Ken, it worked great.