HOW TO
Custom expressions written in Arcade can be used to configure pop-ups in ArcGIS Online. These expressions can be used to generate new data with reference to a field with multiple values in a layer's existing fields.
This article provides the steps to change numerous values in a field of a pop-up via ArcGIS Online Map Viewer. In this example, a new field (Species General Name) is added to the pop-up using the SPECIES_CODE field as reference to display the full name of numerous fish species for each point symbol.



var <variableName1> = Dictionary('<field1>', '<value1>', '<field2>', '<value2>',...);
var <variableName2> = 0;
var <variableName3> = [];
if (Count(Split($feature.<fieldName>, ', ')) > 0) {
for (var i in Split($feature.<fieldName>, ", ")) {
<variableName3>[<variableName2>] = <variableName1>[Split($feature.<fieldName>, ', ')[i]];
<variableName2>++;
}
}
return Concatenate(<variableName3>, ', ');




The pop-up display without the Arcade expression.

The pop-up display after applying the Arcade expression.

Article ID: 000027206
Get help from ArcGIS experts
Start chatting now