Conditional Formatting

713
1
11-11-2019 08:41 AM
NWEdisonTeam
New Contributor II

Hi All,

I have a layer on AGOL that changes color when a condition is met. I am wondering if I can do this on a second step..for example:

If an attribute is "0" then the formatting is blue, if it is any other number it is yellow. After that, I want to say, if it is "approved" it turns green. So

Unreviewed and Number = 0 means blue

Number is not 0 and Unreviewed = yellow

Number is not 0 and Approved = green

0 Kudos
1 Reply
EdApalinski
Occasional Contributor

Hi,

You can create a custom symbol using arcade.  Change style, choose an attribute to show, scroll to the bottom and choose custom expression.  The following arcade statement should work.  You will need to change the field names for "Reviewed" and "Num" to match your layers field names.  This link will also provide help with using arcade to create custom symbology  Use Arcade Expressions to Map Your Ideas 

Good Luck!

Ed

if($feature.Reviewed == 'Unreviewed'&& $feature.Num==0){
return "blue"
}
else if($feature.Reviewed == 'Unreviewed'&& $feature.Num!=0){
return "yellow"
}
else if($feature.Reviewed == 'Approved' && $feature.Num!=0){
return 'green'
}
else if($feature.Reviewed == 'Approved' &&$feature.Num==0){
return 'red'
}