I need to write an Arcade statement that evaluates the values in more than one field before deciding if the expression is true or false. I'm testing in Pro without success, but since my end product will be in ArcGIS Online, I thought I'd post in this community.
The expression is basically like this:
IIf(textField=='Yes' and IsEmpty(dateField), 'TRUE', 'FALSE')
In Pro, I keep getting an error message saying Close parenthesis expected. I tried wrapping the whole expression in parentheses like this:
IIf((textField=='Yes' and IsEmpty(dateField)), 'TRUE', 'FALSE')
But I still get the same error message.
Is it possible that IIf() cannot evaluate true/false when the statement has multiple clauses?
Solved! Go to Solution.
You have to use "&&" instead of "and". Take a look at the list of Operators.
IIf(textField=='Yes' && IsEmpty(dateField), 'TRUE', 'FALSE')
Oh my gosh. I feel foolish! Thank you for the syntax correction! I was moving back and forth between Arcade and SQL and got my operators mixed up.