Learning Arcade and need help with replacing empty feature

03-24-2021 10:44 AM
Labels (1)
New Contributor

I've just started learning Arcade and I am having an issue with something that I assumed would be so simple. I am trying to use a custom expression on label features to show "ASMT" when "Situs.Addr" is empty. Here's what I have, but it fails to show "ASMT" when "Situs.Addr" is empty.

IIf(IsEmpty($feature["Situs_Addr"]), $feature.ASMT, $feature["Situs_Addr"])

0 Kudos
2 Replies
MVP Frequent Contributor

I know the syntax switches in arcade to reference attributes (also not sure why - anyone?), so you may need $feature["ASMT"] along the lines of the other attributes you have.

0 Kudos
MVP Esteemed Contributor

Is "ASMT" a string or an attribute of the feature? If it's just a string, then use

IIf(IsEmpty($feature["Situs_Addr"]), "ASMT", $feature["Situs_Addr"])


0 Kudos