Select to view content in your preferred language

Display Data from Related Table in Popup

9987
11
07-22-2014 09:35 AM
MichaelGlassman2
Deactivated User

With the release of the ArcGIS JavaScript API version 3.10 a new feature has been created that I have been struggling to implement. I have been working with this example: ArcGIS API for JavaScript Sandbox‌ with my own data to attempt to show data from a related table in the popup for a feature. Both the feature and the table are uploaded to a server in the same map service and when viewing the map service I can verify that the relationship does exist. When I click a feature the popup appears but only shows data from the feature and not the related table. I have attached and image that shows the issue. Any suggestions. RelationshipPopup.png

0 Kudos
11 Replies
BradyCallahan
Occasional Contributor

Hmmmm.....

I can see how William Carr's implementation is one path to a possible solution. It needs some tweaking, like a loop to run through all the [items] returned to the getTextContext function so each one gets displayed in the infoWindow.

Mainly I was trying to avoid a multiple "Task" methodology where there are queries for the first click and then another query for the relationship and then another click to display the popup.

The out-of-the-box implementation of the popup at v 3.10 of the api handles the related query for single click solution, there just doesn't seem to be a way to call the returned records except using the mediaInfos structure which is irritating.

0 Kudos
williamcarr
Frequent Contributor
0 Kudos