0

I'm trying to create a pop-up based on a conditional IIF statement and am struggling with the semantics of arcade. This is my code. (Note: I've tried 10 both in and not in quotes)

IIf(IsEmpty($feature["PERCENT_A"]), "10", $feature["PERCENT_A"])

Once I base my pop-up on this expression, it looks like the false condition is working but the true condition is not; or else the popup is still just displaying my PERCENT_A field and applying no conditions to it.

I'm working in arcgis online and in the pop-up contents settings I've selected Display: 'A description from one field' and then selected my saved expression from the dropdown.

1

Ok, I ended up basically just reversing the statement and got it to work (though for some reason the true half of the statement didn't work without the quotes around the 10)

IIf($feature["PERCENT_A"]>0, $feature["PERCENT_A"],"10")

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.