HOW TO
In ArcGIS Online and Portal for ArcGIS Map Viewer, the symbology on the map can be configured to group multiple attribute fields according to the specified conditions using Arcade expressions. This makes certain aspects of the data easily distinguishable when presenting point features on a map.
This article provides the instructions to use Arcade expressions to group unique values from multiple attribute fields in Map Viewer.
The image below shows a map in ArcGIS Online Map Viewer with the default styling point symbology.
var <variableName1> = $feature.<fieldName1> var <variableName2> = $feature.<fieldName2>
if(<variableName1> == "<domainNameOrFieldValue1>") { if(<variableName2> == "<domainNameOrFieldValue2>") { return "<groupName1>" } } if(<variableName1> == "<domainNameOrFieldValue1>") { if(<variableName2> == "<domainNameOrFieldValue3>") { return "<groupName2>" } } else { return "<groupName3>" }
The code block below is an example of the full working expression.
var bObtain = $feature.BandObtained var bColor = $feature.BandColor if(bObtain == "HS") { if(bColor == "G") { return "Group 1" } } if(bObtain == "HS") { if(bColor == "S") { return "Group 2" } } else { return "Group 3" }
The image below shows the groups of unique values customized according to the steps above.
Get help from ArcGIS experts
Download the Esri Support App