Hello!
I've seen many arcade examples where the return is a string or number. How would one write an expression for the return to be the value from a field? For example, one of the questions in my survey incorporates rules. If option 1 is selected then question 3 shows. If option 2 is selected, then question 4 shows. How would I write the expression where the pop-up display mimics the rule? I've dabbled in some coding, but this is my first time delving into Arcade. The documentation is helpful, however, I'm not seeing the answer to my question.
Thank you!!
Solved! Go to Solution.
You can access field values by using the field name in brackets or in dot notation:
return $feature["Field"]
return $feature.Field
So you could do something like this:
return When(
$feature.Option1 == 1, $feature.Question3,
$feature.Option2 == 1, $feature.Question4,
"something went wrong: both options were deselected"
)
You can access field values by using the field name in brackets or in dot notation:
return $feature["Field"]
return $feature.Field
So you could do something like this:
return When(
$feature.Option1 == 1, $feature.Question3,
$feature.Option2 == 1, $feature.Question4,
"something went wrong: both options were deselected"
)
Thank you!
If that solved your question, please mark the answer as solution, so this question is shown as solved.