<?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 Arcade Count Attachments in Related Table in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116720#M42972</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to return the number of attachments in a related table.&lt;BR /&gt;Is this possible?&lt;/P&gt;&lt;P&gt;I know how to count he number of related records, and I know&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var relatedrecords = FeatureSetByRelationshipName($feature, "MonitoringPhotoSites")
var cnt = Count(relatedrecords);
return cnt;&lt;/LI-CODE&gt;&lt;P&gt;And&amp;nbsp; I know how to count the attachments in the feature&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Count(Attachments($feature)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm not quite sure how to combine those two together. Has anyone an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 02:17:56 GMT</pubDate>
    <dc:creator>MarcoPoetsch</dc:creator>
    <dc:date>2021-11-15T02:17:56Z</dc:date>
    <item>
      <title>Arcade Count Attachments in Related Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116720#M42972</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to return the number of attachments in a related table.&lt;BR /&gt;Is this possible?&lt;/P&gt;&lt;P&gt;I know how to count he number of related records, and I know&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var relatedrecords = FeatureSetByRelationshipName($feature, "MonitoringPhotoSites")
var cnt = Count(relatedrecords);
return cnt;&lt;/LI-CODE&gt;&lt;P&gt;And&amp;nbsp; I know how to count the attachments in the feature&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Count(Attachments($feature)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm not quite sure how to combine those two together. Has anyone an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 02:17:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116720#M42972</guid>
      <dc:creator>MarcoPoetsch</dc:creator>
      <dc:date>2021-11-15T02:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Count Attachments in Related Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116745#M42974</link>
      <description>&lt;P&gt;Something like this?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var related_records = FeatureSetByRelationshipName($feature, "MonitoringPhotoSites")
var cnt = 0
for(var rr in related_records) {
  cnt += Count(Attachments(rr))
}
return cnt&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Nov 2021 06:34:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116745#M42974</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-11-15T06:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Count Attachments in Related Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116996#M42980</link>
      <description>&lt;P&gt;Yep, thats it. Not sure what I did wrong. I tried a for loop, but it seems that I missed something...&lt;/P&gt;&lt;P&gt;Anyway, thanks Johannes!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 19:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-count-attachments-in-related-table/m-p/1116996#M42980</guid>
      <dc:creator>MarcoPoetsch</dc:creator>
      <dc:date>2021-11-15T19:03:44Z</dc:date>
    </item>
  </channel>
</rss>

