I have a dynamic query layer (polygon) derived from feature class and SQL table.
Attribute look like:
I need to write code that reports the total count for each value and create graduated color based on the count Using Arcade or any other work around in ArcGIS Online webmap, or ArcGIS Pro.
I know that graduate color could be accomplished only with Number field,
Hi Husham Mohamed ,
Since you mention AGOL or ArcGIS Pro, you have a couple of options. Arcade is capable of accessing a table, do a count and return that value. However, this functionality is not available in the symbology profile. You will need an actual field in your data with the result in order to visualize on it or use the instructions in this document to do otherwise: Symbolizing Feature Class using related table values
You can use ArcGIS Pro and schedule a field calculation to run every # time to update the field and visualize the correct data. The Field Calculation could be a relatively simple Arcade expression that reads out the number of occurrences in the table. In ArcGIS Online, you can probably use a join as described by Paul Barker in this blog: Visualizing related data with Join Features in ArcGIS Online
Hi Xander Bakker,
Unfortunately this functionality is not available in the symbology profile as well as other functionalities.
I ended up re writing the SQL query to include count field.
Thank you, for your Help.
@XanderBakker Is it possible to use Arcade to symbolize a view created in SQL Server?
When I bring in the view and click the symbology icon, I don't get the option to create an expression...
Hi @ArmstKP ,
I am not sure, so I can't confirm, but based on what you are seeing I can imagine that there are restrictions with this datasource.