I have a hosted feature layer of parcels in ArcGIS Online with a related table. I would like to symbolize the count or sum of records per parcel. This seems like it would be straightforward, I'm just not finding the correct resource. Below is a screenshot of the related table:
On the left, you can see the parcel number and a count of related records in parentheses. Ideally, I would like to use this count for a number of things. What's the best way to access the number in parentheses in the figure above?
Solved! Go to Solution.
Unfortunately, the symbology profile for Arcade doesn't allow accessing other features or layers. But there is a way you might be able to do this.
In a fairly recent update, AGOL gained the ability to have hosted view layers of attribute joins. The means that if you created a join based on a shared attribute (does not work for spatial joins), the resulting layer will be "live", and will update as the input layers are modified.
In this instance, you could create an attribute join between the two fields involved in your layer/table relationship. According to the linked documentation above
Statistics are calculated for only those features that meet the specified spatial or attribute relationship used in the Join one to one operation. You can only calculate statistics for numeric fields. When you add statistics, a Join Count field is added that lists the number of matching records summarized for each target feature.
So as long as you configure the join properly, you will be able to have that "count" included in your table, at which point it becomes accessible to the symbology profile.
Unfortunately, the symbology profile for Arcade doesn't allow accessing other features or layers. But there is a way you might be able to do this.
In a fairly recent update, AGOL gained the ability to have hosted view layers of attribute joins. The means that if you created a join based on a shared attribute (does not work for spatial joins), the resulting layer will be "live", and will update as the input layers are modified.
In this instance, you could create an attribute join between the two fields involved in your layer/table relationship. According to the linked documentation above
Statistics are calculated for only those features that meet the specified spatial or attribute relationship used in the Join one to one operation. You can only calculate statistics for numeric fields. When you add statistics, a Join Count field is added that lists the number of matching records summarized for each target feature.
So as long as you configure the join properly, you will be able to have that "count" included in your table, at which point it becomes accessible to the symbology profile.
Hey Josh,
Yup, that totally worked. The statistic generated is useless, but the count is all I need.
Cheers!
Jason