Query Layers or Views don't display popups in New Map Viewer on AGOL or Enterprise

466
1
05-03-2023 09:29 AM
Labels (3)
dhaag
by
New Contributor

I have a database view (have attempted with just a query layer as well) that works and has worked in the past to display a custom popup in AGOL and Enterprise.  This layer now won't display the popup in the new map viewer or in dashboards.  If I switch to the Classic map viewer, the popup displays without issue.  Also, if I publish the layer as a hosted service on AGOL it also works fine.  Seems to only be when it is dynamic from our SDE and in the new map viewer.

I've attached 3 images.  popup shows what it looks like in Classic Viewer.  popup2 shows that when configuring it in the new map viewer, it will display, but if you click on any of the points on the map, no popup displays.  poup3 shows a details widget in dashboards showing No Data.

0 Kudos
1 Reply
RhettZufelt
MVP Frequent Contributor

Your example appears to be point related, so may not apply, but I have had similar issues to this in dashboards using SDE data/views.

Turns out AGOL doesn't play well with fields that are not actually part of the feature class (Shape.STArea(), Shape.STLength()) and are added/calculated on the fly when you access them.

When I modified my view syntax to cast them to a different name, all seems to work fine:

SELECT  OBJECTID, Owner, recnum, Shape.STLength() AS Length

rather than:

SELECT  OBJECTID, Owner, recnum, Shape.STLength()

In fact, I had to create the views in order to overcome this rather than just using the feature class itself.

Hope this helps,

R_

0 Kudos