Hi everyone,
I'm working on an ArcGIS Online map and I need some assistance with creating custom symbology using Arcade expressions. I have two fields in my dataset: 'Win/Loss' and 'MARTIN_OR_BLUE_WATER'. Here's what I'm trying to achieve:
I received a helpful response that provided the following Arcade expression solution, but all I get are gray points on the screen:
Arcade cannot return symbols like that. What you'll have to do is symbolize the returned values in the legend editor.
var output;
If ($feature["Win/Loss"] == 'Retained' || $feature["Win/Loss"] == 'Win') {
output = 'blue';
} Else If ($feature["Win/Loss"] == 'Bid / Not Win' || $feature["Win/Loss"] == 'No Bid' || $feature["Win/Loss"] == 'Loss') {
output = 'red';
} Else {
output = 'yellow ';
}
If ($feature["MARTIN_OR_BLUE_WATER"] == 'BLUE WATER') output += ' outlined';
return output;
Dear JonJones,
I hope you are doing great,
For the issue you have mentioned the best approach can be utilizing Dictionary Renderer.
You can create a simple .stylx utlizing DB Browser for SQLite, but you need a little knowledge of Arcade.
I have published a sample map with points, as you want in ArcGIS Online, please check the below link.
https://where-tech.maps.arcgis.com/apps/mapviewer/index.html?layers=7b7b9e533bb644f89add272e7e3470d7
Please check carefully the table and values, and the colors on the map.
You have lots of freedom in Symbology Renderer, you can modify size of the points dynamicly, or add dynamic text and ......
Please check my Github link in the below to see more in details symbology renderer.
https://github.com/AmirSarrafzadeh/symbology_dictionary
I also attached below some useful links to get more in deep about dictionary renderer.
https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DictionaryRenderer.html
https://pro.arcgis.com/en/pro-app/3.1/help/mapping/layer-properties/dictionary-renderer.htm
Hope it helps
Best wishes