How to use feature's one-to-many statistics as a graduated color symbology in an ArcGIS Online application?

151
3
05-07-2018 02:34 AM
Highlighted
New Contributor

I've made a task oriented ArcGIS Online application that I like to improve: The application is about filling a numeric score field in a table for each row. Each row in the table is related to a feature service's layer row\feature.

--- My Question ---

How can I make the symbology of the related feature to be shown as a graduated color that is based on a statistic value (count, mean, sum etc.) of its related table rows?


I'm almost positive that the answer to this question can be achieved by using the ArcGIS Arcadenew expression option, when used in the change style tab. The reason for this assumption, is I've already manged to so with the layer's pop-ups as specified here. So I think what I'm looking for now is a syntax to represent this one-to-many relationship - something like this pseudocode:

// return the average values of feature's related rows from a numeric score field Average($feature.relationships\0\NumericFieldNameFomRelatedTable)

--- Things I've tried ---

  • 'Dive' quite deep in to the AGOL web map's interface.
  • Try to migrate it to ArcGIS Pro and somehow to fetch the pop-up's expression
  • find an alternative in web-appbuilder's widgets.
  • Arcade Expressions and You examples.

--- Thing's I need to go a little deeper ---

  • how to do this by python in ArcMap
Reply
0 Kudos
3 Replies
Highlighted
Esri Esteemed Contributor

At this moment Arcade is not able to access related data, it can only access the attributes of a single feature. In the future this (and more) will be included. Perhaps by using the ArcGIS API for Python you could update an attribute based on the statistics of the related table, but this would be a static result, while Arcade would yield a dynamic result. In other words, when the related data changes you would have to run the script again to reflect the changes in the map. 

Highlighted
New Contributor

Thank you for your quick answer.

Just to make sure: you're saying it's not possible to show a feature layer's symbology based on a related data statistics despite its pop-up does?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

The pop-up will provide access to the related data, but Arcade at this point (1.3.0 December 2017) does not have access to this related data. I can't be used for the symbology and nor for adding additional information in the pop-up (using Arcade).