I would like to use an Arcade expression in ArcGIS Online web maps to assign a symbol and a colour to different attributes. For example, if the attribute value is 'yes': the symbol is round and has a green colour. And if the attribute value is 'no': Symbol is a square and has a red colour.

Is this possible in an Arcade expression?

1 Answer 1


Yes, it is possible!!

I am sharing the workflow to be followed.

Here, I have demonstrated if StreetType is "ST" symbolize as "Green Circle" and if the StreetType is "DR" symbolize them as "Red Squares"

enter image description here

Use the below Arcqade Expression to set up the service.

var PCI = $feature.StreetType;
if (PCI == "ST") {
    return "Yes";
} else if (PCI == "DR") {
    return "No";

Once the expression is set, select the option to symbolize enter image description here

Set the shape and color as per your requirements.

enter image description here

enter image description here

  • Thank you for your answer! Is it true that if an attribute has more values than 'yes' and 'no' it would not be possible ( for instance an extra attribute value of 'maybe')? And I can not set the symbol from the expression right?
    – NVaissier
    Nov 25, 2020 at 9:33
  • 1
    You can add the "Maybe" and set the symbology as well, just that you have to modify the expression by using the Multiple IIF() statements. Nov 25, 2020 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.