<?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: Using Arcade to display image attachment in pop-up in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1112384#M42777</link>
    <description>&lt;LI-CODE lang="javascript"&gt;var attach = Attachments($feature)
if(Count(attach) == 0) {
  return "no attachments"
}
var Part1 = "https://services8.arcgis.com/OxmrsInax8iIPqdy/arcgis/rest/services/Civils_Data_Collection/FeatureSer..."
var ObjectID = $feature.OBJECTID
var Part2 = "/attachments/"
var AttachID = First(attach).ID
var Token = "?token=I HAVE REMOVED THIS.
return Part1 + ObjectID + Part2 + AttachID + Token&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 29 Oct 2021 12:28:04 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2021-10-29T12:28:04Z</dc:date>
    <item>
      <title>Using Arcade to display image attachment in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1112364#M42776</link>
      <description>&lt;P&gt;Hi, I am hoping someone can help me here, I am fairly new to Arcade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use arcade to show an image attachment in a pop-up in AGOL.&lt;/P&gt;&lt;P&gt;I can get it to work ok using the code below as long as all features have an attachment.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;EM&gt;var Part1 = "&lt;A href="https://services8.arcgis.com/OxmrsInax8iIPqdy/arcgis/rest/services/Civils_Data_Collection/FeatureServer/4/" target="_blank" rel="noopener"&gt;https://services8.arcgis.com/OxmrsInax8iIPqdy/arcgis/rest/services/Civils_Data_Collection/FeatureServer/4/&lt;/A&gt;"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;EM&gt;var ObjectID = $feature.OBJECTID&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;EM&gt;var Part2 = "/attachments/"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;EM&gt;var AttachID = First(Attachments($feature)).ID&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;EM&gt;var Token = "?token=I HAVE REMOVED THIS.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;EM&gt;return Part1 + ObjectID + Part2 + AttachID + Token&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I come across a feature without an attachment the code returns this.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Execution Error:&lt;/SPAN&gt;Runtime Error: Cannot call member method on null. ID&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Is there an easy way to deal with these null values?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 11:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1112364#M42776</guid>
      <dc:creator>adrianmoisey1</dc:creator>
      <dc:date>2021-10-29T11:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to display image attachment in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1112384#M42777</link>
      <description>&lt;LI-CODE lang="javascript"&gt;var attach = Attachments($feature)
if(Count(attach) == 0) {
  return "no attachments"
}
var Part1 = "https://services8.arcgis.com/OxmrsInax8iIPqdy/arcgis/rest/services/Civils_Data_Collection/FeatureSer..."
var ObjectID = $feature.OBJECTID
var Part2 = "/attachments/"
var AttachID = First(attach).ID
var Token = "?token=I HAVE REMOVED THIS.
return Part1 + ObjectID + Part2 + AttachID + Token&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:28:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1112384#M42777</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-10-29T12:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to display image attachment in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1113127#M42802</link>
      <description>&lt;P&gt;Thanks for the reply, I will give it a go.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 09:16:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1113127#M42802</guid>
      <dc:creator>adrianmoisey1</dc:creator>
      <dc:date>2021-11-02T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to display image attachment in pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1415470#M58838</link>
      <description>&lt;P&gt;How do you generate the token and ensure it works for the user??&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 18:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-display-image-attachment-in-pop-up/m-p/1415470#M58838</guid>
      <dc:creator>SolanaFoo2</dc:creator>
      <dc:date>2024-04-25T18:38:49Z</dc:date>
    </item>
  </channel>
</rss>

