AnsweredAssumed Answered

Arcade If Statement for Multiple Unique Values

Question asked by jpilbeam Champion on Mar 5, 2020
Latest reply on Jun 24, 2020 by jpilbeam

Using this help page: How To: Group unique values from multiple attribute fields in ArcGIS Pro 

 

This little Arcade script groups unique values from multiple attribute fields. I created two variables, one for each attribute field. I then grouped unique values from each of the two fields and named it Batteries. It works fine.

var cat = $feature.USER_Categ
var key = $feature.USER_Keywo

if (cat == "Batteries;"){
if (key == "Lead-Acid Batteries;"){
    return "Batteries"}
}

 

How would I group multiple unique values? I've tried using multiple if statements, but that didn't seem to work.

Outcomes