Display Related Table Values in 1:M Relationship in Popups

2307
7
05-31-2017 11:23 AM
Status: Open
New Contributor II

ArcGIS Online popup configuration. It would be so valuable if there could be a way to display related table information from a 1:M relationship within an actual popup. I do not want another click to view additional records. Displaying summary count information is not useful or practical for many purposes. 

I am creating a property application using the ArcGIS for JavaScript API and I need to access related table information (from a 1:M relationship) in a popup of an ArcGIS Online web map that I use with the API. I need to display all the related table information but can only display the count. It would be great if we could display the actual values.

Thank you

7 Comments

I have the same need. Hopefully somebody presents a solution. JE

Does anyone know if there is a custom widget for WAB that does this?

I figured out a workaround for this, but yes it would be nice if the related table info from 1:M could be displayed directly in the popups without the current "drilldown" method. I definitely voted UP for this idea. In the meantime, here's my workaround:

  • Use the standard WAB widget "Near Me."
  • Configure it for a single layer and limit the number of results to 1 in the search settings.
  • When you set it up to search a Feature Class (1) : Related Table (M), the related records will show up at the bottom of the "Near Me" report. You can control the attributes that appear in the report in the web map popup area.

Near Me displaying 1:M data

Here's a link to the app that I am working on if you want to see it in action. It's a basic parcel viewer that shows parcel info/tax total (1) : payments made (M). Commercial and industrial properties are the ones that typically have 1:M examples (you can zoom+click the parcel to see the "Near Me" info without searching). The only drawback to this workaround is I don't think you can set the order of the entries coming from the :M table.

The database is pretty simple. Parcel feature class (1) : Tax payment table (M). Was created using ArcGIS in a file geodatabase with relationship class. Published to ArcGIS Online as a feature service.

Brian,

I checked out your testing app and like the way you implemented the default parcel popup info for displaying related tax payments as a click through within the popup window, and how the user can just continue clicking the related records link to get back to the original parcel info popup. I do not care so much for how the Near Me widget works as it has to be set as being an active tool and opens in a side window, and that the parcel lines for all the other parcels disappear once you click on a parcel to bring up the attributes. Thanks for sharing!  

Sure you're welcome. Indeed, there is no real good way to "hide" the Near Me widget - it has to be docked like I have it or it has to be an optional tool that a user can click from the toolbar. FYI: It is possible to show all parcels and not just the selected one. See attached pic, its an option in the Near Me configuration called "Only draw selected layer results." If unchecked: all the parcels show.

Show selected

Reading some recent esri blogs I found another way to display 1:M attributes in pop-ups. If you have a hosted feature service in AGOL (not sure if this works in Enterprise portal) you can use the Join Features tool to create a 1:1 join. You can then define which value from the 1:M table to show: most recent date, for example. Then you can set the output to be a "hosted feature layer view" which can then be used to create pop-ups of the selected 1:M attributes. Because it is a hosted view it updates as you enter more rows in the :M table. Limitation ~ the output only includes a feature when there is a join, all others are dropped (until a :M entry is created).

This can be achieved with Arcade - see this link for more details.