I am tasked with sorting Zoning codes numbering over 100 to just 5 (Residential, Office, Commercial, Industrial and Misc).
For whatever reason I cannot get Arcade to recognize a text attribute other than the first two statements.
I've tried the following with no success:
if ($feature.ZONE == "C-1"){
$feature.ZONE1; 'Commercial'}
else $feature.ZONE1; 'Miscellaneous'
I want any Field containing a value "C-" or "CB-" to be Commercial, "I-" to be Industrial, "R-" residential and "Misc" everything else.
var zone = $feature.ZONE;
if (find('C-', zone,0)>0) {
return 'Commercial'
};
if (find('O-', zone,0)>0) {
return 'Office'
};
if (find(['R-',"X-","SH","SR"], zone,0)>0) {
return 'Residential'
};
else {
return 'Misc'
};
Am I just using the wrong processing tool?