HOW TO
In ArcGIS Pro, Arcade expressions can be used to create a new field with values assigned based on the values of another field. This is useful for classifying the values of a field into groups of values in a new field.
This articles provides an example and instruction using the Find() Arcade expression in ArcGIS Pro. In this example, the Arcade expression is used to create a new field called Make_Grouping with values assigned according to the values in the Make field, as seen in pop-up in the image below.
if (Find("<uniquePartOfFieldValue>", $feature.<fieldName>, 0)>-1) {
return "<newFieldValue>";
} else if (Find("<uniquePartOfFieldValue1>", $feature.<fieldName>, 0)>-1) {
return "<newFieldValue1>";
}
if (Find("Cl", $feature.Make, 0)>-1) {
return "A";
} else if (Find("Io", $feature.Make, 0)>-1) {
return "B";
} else if(Find("Ke", $feature.Make, 0)>-1) {
return "C";
} else if(Find("Lu", $feature.Make, 0)>-1) {
return "D";
} else if(Find("Mu", $feature.Make, 0)>-1) {
return "E"
} else if(Find("Or", $feature.Make, 0)>-1) {
return "F";
} else if(Find("Pa", $feature.Make, 0)>-1) {
return "G";
} else if(Find("Wa", $feature.Make, 0)>-1) {
return "H"
}
The newly configured pop-up below displays the newly added Make_Grouping field with assigned values in the pop-up after using the Arcade expression.
Get help from ArcGIS experts
Download the Esri Support App