AnsweredAssumed Answered

Arcade symbology expression for custom groups

Question asked by jmcmeek5 on Oct 30, 2019
Latest reply on Nov 6, 2019 by jmcmeek5

Hello,

Looking to see if someone would be able to assist in generating an Arcade expression that I would like to apply to an internal REST service.

It is a tree inventory layer (800,000+ features) that I would like to create 3 custom groups (High, Medium and Low Risk) based on the tree species name.

Based on these three groups, I want to change the point symbology to either a red colour for high-risk, orange point for medium-risk and yellow colour for low-risk trees. 

 

I have attempted to do create it but with no luck.  The script below seems to generate only the Low-Risk group when added to arcgis pro.

 

Script as of now:

var name = $feature.BOTANICAL_NAME


if (name == "Quercus*"|| name == "Acer*"|| name == "Picea*") {

return "High Risk" }
}
if (name == "Betula*" || name =="Fagus*"|| name =="Salix*" || name =="Juglans*" || name =="Gleditsia*" || name =="Malus*" || name =="Prunus*" ) {
return "Medium Risk"}
}

else {

return "Low Risk" }

I never claimed to be good at scripting by the way!

Any assistance would be greatly appreciated!

 

Josh

Outcomes