I have looked at several examples of arcade expressions, and have read the ESRI developer manuals online to figure out how to display fields conditionally in popups on ArcGIS Enterprise.
I would like to display 2 fields on the popup in a webmap. If my province code is greater than 59, I want to display fields x12 and x10. Else, I would like to display fields y6 and y4. So, I am trying to display different fields based on the value of another field.
Here is a psuedo-arcade code that does not work! I understand the return statement is not correct
var prov = $feature.province_code;
field1 = IIf(prov > 59, $feature.both_rate_12, $feature.both_rate_6)
field2 = IIf(prov > 59, $feature.both_rate_10, $feature.both_rate_4)
return field1, field2
Would you please help me re-write this code so it works!