Hi All,
I am having an issue displaying media attachments in the details widget of a dashboard I recently created in AGOL to replicate a dashboard I created in portal. I switched over to AGOL to get the updated built-in functionality that has recently been applied to the dashboard application.
I would like to set up a details widget to display photo attachments, similar to how I had it set up in the portal. When I try to do this in the AGOL dashboards the photos do not appear, see the first screenshot below. I have the widget set so that it should show only "Media".
The dashboard however is recognizing that there are attachment photos. When I set the widget to show "Attachments" a list of my attachments appears, see screenshot below circled in blue. There are multiple photo attachments per feature.
In the version I made in the portal the images display perfectly when the media option is enabled, as you can see below.
I tried a workaround by creating attachment URLs in arcade following the methodology of this post, and then trying to use an embedded content widget to display them. Unfortunately, this didn't work either.
Any help on what's going on here would be greatly appreciated. Thanks.
Solved! Go to Solution.
So this layer was coming directly from our local map server, not our AGOL account. I ended having the layer published as its own feature service and now, the lists option for attachments in the new map viewer can be switched to "Gallery". Now in the dashboard details widget, the attachments have a preview of the image. It still does not allow you to view "Media" as stand-alone images, but with the "list" option changed to "gallery" in the popup options for the layer, and selecting "Attachments" in the widgets, it will display a preview of the image. For any future viewers that look into this issue - make sure your layer is a feature service layer on an AGOL account, or this will not work.
Hello Phillip,
Since you are migrating this from portal to AGOL, my first question would be security of the images and or feature layer. Where did you publish the feature layer from? ArcMap or ArcGIS Pro?
Tried directly migrating the dashboard from portal to AGOL using this code, but things came over and weren't working, so I just ended building a replicated version of it in AGOL from scratch.
The layer is currently only shared within my organization and is not public.
I did publish the layer, I grabbed it from our map server.
Hope that helps.
I think this is a bug:
https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzOTEwOQ==
Yea this looks like the issue, I'm going to try the second workaround and see if works.
So initially the second workaround provided in the bug link looked promising. It read as "2. Open the web map in the new Map Viewer and toggle off the ‘Show as List’ option under the pop-up configuration for the layer." Unfortunately, when I went to do this my layer only supports list views.
I wonder what would cause that? Maybe find out how your layer can be changed to support other types of views other list views.
So this layer was coming directly from our local map server, not our AGOL account. I ended having the layer published as its own feature service and now, the lists option for attachments in the new map viewer can be switched to "Gallery". Now in the dashboard details widget, the attachments have a preview of the image. It still does not allow you to view "Media" as stand-alone images, but with the "list" option changed to "gallery" in the popup options for the layer, and selecting "Attachments" in the widgets, it will display a preview of the image. For any future viewers that look into this issue - make sure your layer is a feature service layer on an AGOL account, or this will not work.