Multiple IIF() Statements in Arcade Expression

31537
11
Jump to solution
05-10-2018 06:01 AM
Lake_Worth_BeachAdmin
Occasional Contributor III

I am trying to use multiple IIF() statements inside a single arcade expression.

Before I was creating 10 separate expressions and using them all in my pop-up configs, but I am now facing the challenge with 30+ IIF() statements for a single field and do not want create 30+ arcade expressions and incorporate all 30 inside pop-up config.

my method which I thought would work but its only displaying blank values

IIF($feature.field =='apple','fruit','')

IIF($feature.field=='carrot','ewwwwww','')

IIF($feature.field=='candy','yummy','')

I want the above all inside a single expression and have it display the desired output depending on field's value.

however the above is not displaying any output even if the field value is candy, or carrot or apple.

is multiple IIF() statements on a single field a limitation of arcade?

Tags (2)
11 Replies
by Anonymous User
Not applicable

same question. Can arcade expressions use two fields to generate a variable?

0 Kudos
MarieCline_Delgado
Occasional Contributor

Wicked helpful Kristian! Thank you!  WHEN and DECODE are the way to go

0 Kudos