<?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 for pop-ups in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-pop-ups/m-p/1025810#M38437</link>
    <description>&lt;P&gt;You should spend some time looking at the &lt;A href="https://developers.arcgis.com/arcade/function-reference/" target="_self"&gt;Arcade Function Reference&lt;/A&gt;, and test things out in the &lt;A href="https://developers.arcgis.com/arcade/playground/" target="_self"&gt;Playground&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;What you're attempting to do is very simple, but it helps if you know what data types you're dealing with. &lt;STRONG&gt;Intersects&lt;/STRONG&gt;, for example, returns a &lt;STRONG&gt;FeatureSet&lt;/STRONG&gt; of all intersecting features from your inputs. (Not to be confused with &lt;STRONG&gt;Intersection&lt;/STRONG&gt;, which returns the shape of the overlap between exactly two geometries.)&lt;/P&gt;&lt;P&gt;Thankfully, the Arcade function &lt;STRONG&gt;Sum&lt;/STRONG&gt; does take a FeatureSet as an input.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;var inter = Intersects(layer_a, layer_b)

return Sum(inter, 'field-to-sum')&lt;/LI-CODE&gt;&lt;P&gt;It's also worth looking at &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#groupby" target="_self"&gt;&lt;STRONG&gt;GroupBy&lt;/STRONG&gt;&lt;/A&gt;, which can take a FeatureSet and return all sorts of statistics for multiple fields.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 13:27:02 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-02-11T13:27:02Z</dc:date>
    <item>
      <title>arcade for pop-ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-pop-ups/m-p/1025809#M38436</link>
      <description>&lt;P&gt;Hi, in arcade for pop-ups, im intersecting two polygons layers. how to calculate the sum of selected(Intersected) records&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 13:08:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-for-pop-ups/m-p/1025809#M38436</guid>
      <dc:creator>NadimHammoud</dc:creator>
      <dc:date>2021-02-11T13:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: arcade for pop-ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-pop-ups/m-p/1025810#M38437</link>
      <description>&lt;P&gt;You should spend some time looking at the &lt;A href="https://developers.arcgis.com/arcade/function-reference/" target="_self"&gt;Arcade Function Reference&lt;/A&gt;, and test things out in the &lt;A href="https://developers.arcgis.com/arcade/playground/" target="_self"&gt;Playground&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;What you're attempting to do is very simple, but it helps if you know what data types you're dealing with. &lt;STRONG&gt;Intersects&lt;/STRONG&gt;, for example, returns a &lt;STRONG&gt;FeatureSet&lt;/STRONG&gt; of all intersecting features from your inputs. (Not to be confused with &lt;STRONG&gt;Intersection&lt;/STRONG&gt;, which returns the shape of the overlap between exactly two geometries.)&lt;/P&gt;&lt;P&gt;Thankfully, the Arcade function &lt;STRONG&gt;Sum&lt;/STRONG&gt; does take a FeatureSet as an input.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;var inter = Intersects(layer_a, layer_b)

return Sum(inter, 'field-to-sum')&lt;/LI-CODE&gt;&lt;P&gt;It's also worth looking at &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#groupby" target="_self"&gt;&lt;STRONG&gt;GroupBy&lt;/STRONG&gt;&lt;/A&gt;, which can take a FeatureSet and return all sorts of statistics for multiple fields.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 13:27:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-for-pop-ups/m-p/1025810#M38437</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-02-11T13:27:02Z</dc:date>
    </item>
  </channel>
</rss>

