Arcade to label specific domain

794
1
04-17-2018 11:51 AM
KathleenWallis
Occasional Contributor II

How would I use arcade to label features, but only those that the domain = "X"

My feature name is Systmevalve
My column name is VALVEUSE
The domain I want Labeled has the CODE ZBV in the domain.

Thanks
I think I need to take a course on Arcade
katy

Tags (2)
0 Kudos
1 Reply
ChelseaRozek
MVP Regular Contributor

Hello Katy,

      I set up a similar layer to test this out. 

In my webmap, you can use either of these expressions to only label those X/ZBV features. One just looks at the code value, and the other looks at the description value. In the IIF() expression, if the expression evaluates to false, I have the label set as '', which is an empty string so you don't see a label. If the expression evaluates to true, I have 'X' as the label value, but you can put anything there, like DomainName($feature,'valveuse') if you want the description or $feature.valveuse if you want the code.

IIF(DomainName($feature, 'valveuse')=='X','X','') OR IIF($feature.valveuse=='ZBV','X','')

Let me know if you have any further questions!

0 Kudos