HOW TO
The Find() Arcade expression can be used to create a new field with values assigned based on the values of another field. This expression is useful for classifying the values of a field into groups of values in a new field.
This articles provides the workflow using the Find() Arcade expression in Portal for ArcGIS and ArcGIS Online Map Viewer. 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 map below shows the newly added Make_Grouping field with the assigned values in the pop-up after applying the Arcade expression.
Get help from ArcGIS experts
Download the Esri Support App