Showing related records in a AGOL pop-up menu?

173
2
2 weeks ago
Labels (1)
jackolcott
New Contributor II

I have a polygon layer A that has a one-many relationship class with table B. I also have a different polygon layer C.

jackolcott_0-1713281925402.png

 

Question: In the AGOL pop-up menu, when a user clicks on a layer C polygon, is it possible to show the related records from B for the polygons from layer A that intersect the user-selected layer C polygon?

 

For a little more context, A are county polygons. C are state polygons. I want to show all the related records (from B) for the counties (from A) that intersect the user-selected state (from C).

 

I want to show related records in the style below, where a user can click into the related record in the pop-up menu using the ">" arrow. For the pop-up menu for the state of Maine (from C), I would want to show all the projects (from B) in the counties in Maine (from A).

jackolcott_1-1713281925445.png

 

Thank you for your time reading this post.

0 Kudos
2 Replies
HollyTorpey_LSA
Occasional Contributor III

Hi! If you created a relationship class in Pro in a GDB prior to publishing the feature class and table to AGOL, you should be able to add the related records to your popup by adding a Related Records element. Here are some screenshots:

HollyTorpey_LSA_1-1713284890336.png

 

HollyTorpey_LSA_2-1713284922478.png

HollyTorpey_LSA_0-1713284858497.png

Note that if you don't see the Related Records element in your popup configuration options, then AGOL doesn't know that the feature class has a related table. If that's the case, I would revisit the configuration and publishing process in Pro using this as a guide: https://support.esri.com/en-us/knowledge-base/how-to-set-up-related-tables-in-arcgis-pro-for-use-in-....

Hope that helps!

 

- Holly
0 Kudos
jackolcott
New Contributor II

Holly - thank you for your time and your response. Thank you for providing the link to the ESRI article. 

I used a relationship class developed in ArcGIS Pro to bring the related records from table B into the pop-up menu for layer A in AGOL. My question has one more twist: can I show the related records from table B in the pop-up menu for layer C? The idea is that I could access the polygons from layer A which intersect the user-selected polygon in layer C, and then show the related records from table B in the pop-up menu for layer C.

I am not sure if this is possible, because it seems like related records can only be tied to the layer that has the relationship class. In this case, layer A has a one-many relationship class with table B, while layer C is a separate layer. 

I have been testing whether Arcade functionality (namely $feature, Intersects(), and FeatureSet functions) can be used to grab all the polygons from layer A that intersect the user-selected polygon from layer C, and then show the related records for the polygons from layer B in the pop-up menu for layer C. Using the example geographies above, in the pop-up menu for an individual state (layer C), I want to show all the related records (table B) for all the counties (layer A) and intersect the user-selected state (layer C). 

0 Kudos