<?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: Arcade Expression in Image Popup in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239266#M11849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lorne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you will receive the results you need by just passing the field for the Image.&amp;nbsp; Here is an example of a pop-up with no URL in the field:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/430942_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a pop-up that contains a URL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/430943_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Dec 2018 15:58:53 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2018-12-05T15:58:53Z</dc:date>
    <item>
      <title>Arcade Expression in Image Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239265#M11848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to a simple expression in Arcade to populate the image portion of a popup. I have two fields in my data containing the google drive location of the image and its thumbnail. I use the following to test if an image exists for record:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;return IIF(isEmpty($feature.Picture), "", $feature.Picture)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the popup is configure as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG alt="Popup Media Configuration" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/430931_popupconfig.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works as expected when there is no image available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="No image for feature" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/430932_popupworks.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when there is an image the following happens:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Popup with image" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/430933_popupwithimage.PNG" /&gt;&lt;/P&gt;&lt;P&gt;When I checked the response it turns out Arcade is trashing the&amp;nbsp;URL from the field. So instead of sending&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdrive.google.com%2Ffoo%2Fb.ar%2Fuc%3Fexport%3Dview%26id%3D1qLYMclQ5nDGYaM895ziF-5EzD4Am385-" rel="nofollow" target="_blank"&gt;https://drive.google.com/foo/b.ar/uc?export=view&amp;amp;id=1qLYMclQ5nDGYaM895ziF-5EzD4Am385-&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is sent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdrive.google.com%2Ffoo%2Fb.ar" rel="nofollow" target="_blank"&gt;https://drive.google.com/foo/b.ar&lt;/A&gt;&lt;/SPAN&gt;/uc?export=view&amp;amp;amp;id=1qLYMclQ5nDGYaM895ziF-5EzD4Am385-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice how &amp;amp; got changed to &amp;amp;amp;. This ends up causing the GET request for the image to fail/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accessing the images by just passing the field into the popup works fine, but I'd rather test for the existence and only provide the link and thumbnail if there is one. Any thoughts on why this is happening and how to prevent it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2018 15:41:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239265#M11848</guid>
      <dc:creator>LorneDmitruk2</dc:creator>
      <dc:date>2018-12-05T15:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression in Image Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239266#M11849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lorne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you will receive the results you need by just passing the field for the Image.&amp;nbsp; Here is an example of a pop-up with no URL in the field:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/430942_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a pop-up that contains a URL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/430943_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2018 15:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239266#M11849</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-12-05T15:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression in Image Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239267#M11850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That does the trick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2018 17:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-in-image-popup/m-p/239267#M11850</guid>
      <dc:creator>LorneDmitruk2</dc:creator>
      <dc:date>2018-12-05T17:45:04Z</dc:date>
    </item>
  </channel>
</rss>

