AnsweredAssumed Answered

Arcade Expression "if/then" statement

Question asked by abohnhoff on Jul 22, 2019
Latest reply on Jul 23, 2019 by LanceCole

I am looking to create an expression in Arcade using multiple "if/then" statements. The issue I am running into is trying to use "AND" in between statements. I currently have a flag if the bench is identical or not. It looks like this:


if ($feature.toe_target_caps==
$feature.target_formation) {return 1}
else {return 0}


What I need to do next is say

if target_formation = "NIOBRARA A" and toe_target_caps = "NIOBRARA B" = 2

if target_formation = "NIOBRARA B" and toe_target_caps = "NIOBRARA C" = 3

if target_formation = "NIOBRARA A" and toe_target_caps = "NIOBRARA C" = 4

else {return 0}


So ideally I would have flags 5 flags (0-4). Thanks!


target picture