Hello,
I've got an Arcade question. I have a feature set of points with an attribute "Type" that details the feature type. I have another attribute that is a numeric ID that corresponds to the text attribute Type. Example: Hydrant =1, Curb Stop = 2 etc. What's the best way to write an attribute rule in Arcade that will populate the numeric ID based on the value from the text type? My knee jerk is to do a super long If/Else exchange to the effect of:
var waterType = $feature.Type
if (waterType='Hydrant'){
return 1;
}
if(waterType='Curb Stop'){
return 2;
}
etcHowever, there are like, 60 possible types which strikes me as a bit onerous to put into an if statement like that. Is there a better way?