<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Popup media group from Arcade Array in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/popup-media-group-from-arcade-array/m-p/1228316#M48696</link>
    <description>&lt;P&gt;I ended up coming up with the following solution, posting in case it might help anyone else:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var contents = Split($feature.photourls, ',', -1, TRUE)
var imageArray = []
if (Count(contents) &amp;gt; 0) {
    for (var i in contents) {
        var value = Dictionary("sourceURL", contents[i])
        var image = Dictionary("type", "image","value", value)
        Push(imageArray, image)
    }
    var imageDict = Dictionary("type","media","description", "Media Group Photos", "mediaInfos",imageArray)
    return imageDict
} else {
    return Dictionary("type","text","text","No Photos to Display")
}&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 03 Nov 2022 14:12:32 GMT</pubDate>
    <dc:creator>ADClark</dc:creator>
    <dc:date>2022-11-03T14:12:32Z</dc:date>
    <item>
      <title>Popup media group from Arcade Array</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/popup-media-group-from-arcade-array/m-p/1228055#M48675</link>
      <description>&lt;P&gt;I am trying to determine how to create a popup Media Group of images from an Arcade array of image URLs. The images are not stored as attachments, but as a list of URLs in a field. I have been able to successfully parse the list and display the images using rich text with HTML tags, but I would prefer to have the look of a media group (i.e. with forward/backward arrows).&lt;/P&gt;&lt;P&gt;I know that JSON for a media group is generally of the following format:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{
    "type": "media",
    "description": "",
    "mediaInfos": [
        {
            "altText": "",
            "caption": "",
            "title": "",
            "type": "",
            "value": {
                "linkURL": "",
                "sourceURL": ""
            }
        },
        {
            "altText": "",
            "caption": "",
            "title": "",
            "type": "",
            "value": {
                "linkURL": "",
                "sourceURL": ""
            }
        }.......]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would the best approach be to simply build a JSON representation for the media group and then return the results of calling "FromJSON" on it? (&lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#fromjson" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/data_functions/#fromjson&lt;/A&gt;) Would that actually work to display a media group in the popup?&amp;nbsp; Thanks in advance for any input or ideas.&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 19:45:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/popup-media-group-from-arcade-array/m-p/1228055#M48675</guid>
      <dc:creator>ADClark</dc:creator>
      <dc:date>2022-11-02T19:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Popup media group from Arcade Array</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/popup-media-group-from-arcade-array/m-p/1228316#M48696</link>
      <description>&lt;P&gt;I ended up coming up with the following solution, posting in case it might help anyone else:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var contents = Split($feature.photourls, ',', -1, TRUE)
var imageArray = []
if (Count(contents) &amp;gt; 0) {
    for (var i in contents) {
        var value = Dictionary("sourceURL", contents[i])
        var image = Dictionary("type", "image","value", value)
        Push(imageArray, image)
    }
    var imageDict = Dictionary("type","media","description", "Media Group Photos", "mediaInfos",imageArray)
    return imageDict
} else {
    return Dictionary("type","text","text","No Photos to Display")
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Nov 2022 14:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/popup-media-group-from-arcade-array/m-p/1228316#M48696</guid>
      <dc:creator>ADClark</dc:creator>
      <dc:date>2022-11-03T14:12:32Z</dc:date>
    </item>
  </channel>
</rss>

