HOW TO
Custom expressions written in the Arcade expression language can be used to configure pop-ups in ArcGIS Online. 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 by 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> = Split($feature["<field name>"], ', '); var <variableName3> = Count(values) var <variableName4> = 0; var <variableName5> = []; if (<variableName3> > 0) { for (var <i> in values) { <variableName5>[<variableName4>] = <variableName1>[values[<i>]]; <variableName4>++; } } return Concatenate(<variableName5>, ', ');
The image below shows the pop-up display without the Arcade expression.
The image below shows the pop-up display with the Arcade expression.
Artikel-ID: 000027206
Unterstützung durch ArcGIS-Experten anfordern
Esri Support App herunterladen