1

I am trying to do build some Attribute Expressions using Arcade and I am having some issues with it returns the else statement. I know that there are features that would return true because I have used these parameters under filters before.

var parksign = $feature.ParkSign2;
var signpole = $feature.SignPole1;

if(parksign == 'One on bus stop pole, 2nd on breakaway in ground, grass, dirt'){
    return 'Yes'
}else if(signpole == 'Yes, Metro breakaway in ground, grass, or dirt'){
    return 'Yes'
}else{
    return 'No'
}
2

After halfway completing this post yesterday I ended up finding the answer. The fields that I was attempting to use logical statements on were configured with Domains or a List of Values. When you configure using these fields everywhere else in the platform the domain alias is displayed in the filter or function, but when you configure using Arcade or Attribute Expressions $feature.SignPole1 is looking for the Domain Code. If you want to look at the Name/Label you have to use DomainName($feature.SignPole1).

For assistance you can reference you can look at the feature class information > data > fields > list of values. feature class fields info

OR

Under the Attribute Expressions panel globals > $feature > find you data columnAttribute Expression field list functions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.