AnsweredAssumed Answered

Multiple When or if/else statements?

Question asked by AGarcia_OCDE_GIS on Jul 3, 2019
Latest reply on Jul 8, 2019 by AGarcia_OCDE_GIS

Hello, I'm still a bit fresh at Arcade expressions, I'm hoping someone can help. I'm trying to write an expression for a pop-up that will list various lines of text that I add based on table attributes. For example, the attributes in about 10 fields are either "y" or "n". I would like a sentence, "blah blah blah" to be included in the pop-up if it is a "y", nothing if it's an "n". This I can do with a simple "When" statement:

"When($feature["HiF1"]== "y",'Strong and Engaged Leadership','')

The problem is there are 9 other attributes with accompanying sentences like the example. Is there a way to add multiple "When" statements so that if there are 1, 2, 5, or even all 10 "y" attributes they will each be listed? I've tried if else and IIf, I'm only able to get one to pop-up at a time.

 

Thank you in advance for any suggestion,

Best Regards,

Albert

Outcomes