<?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 Find point feature count in multi-polygon feature layer with Arcade expression in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355269#M56168</link>
    <description>&lt;P&gt;I am working in ArcGIS Online and need to show the point feature count in a polygon layer with multiple features. I found a way to show the count, but it's not too meaningful yet: I need help iterating over the polygon features. Do you know how I can iterate over the polygon features by say fieldname1?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var p = Portal("https://name.maps.arcgis.com");
// Point feature is incidents
var incidents = FeatureSetByPortalItem(p, "123rty", 0);
// Polygon feature is divisions
var divisions = FeatureSetByPortalItem(p, "abc123", 0);

// Iterate over divisions FeatureSet and get intersected incidents for each
for(var d in divisions) {
var inc_count = Count(Intersects(d, incidents))

Console('There are currently ' + inc_count + ' incidents in ')&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 30 Nov 2023 17:47:09 GMT</pubDate>
    <dc:creator>ellipsol</dc:creator>
    <dc:date>2023-11-30T17:47:09Z</dc:date>
    <item>
      <title>Find point feature count in multi-polygon feature layer with Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355269#M56168</link>
      <description>&lt;P&gt;I am working in ArcGIS Online and need to show the point feature count in a polygon layer with multiple features. I found a way to show the count, but it's not too meaningful yet: I need help iterating over the polygon features. Do you know how I can iterate over the polygon features by say fieldname1?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var p = Portal("https://name.maps.arcgis.com");
// Point feature is incidents
var incidents = FeatureSetByPortalItem(p, "123rty", 0);
// Polygon feature is divisions
var divisions = FeatureSetByPortalItem(p, "abc123", 0);

// Iterate over divisions FeatureSet and get intersected incidents for each
for(var d in divisions) {
var inc_count = Count(Intersects(d, incidents))

Console('There are currently ' + inc_count + ' incidents in ')&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Nov 2023 17:47:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355269#M56168</guid>
      <dc:creator>ellipsol</dc:creator>
      <dc:date>2023-11-30T17:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Find point feature count in multi-polygon feature layer with Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355298#M56170</link>
      <description>&lt;P&gt;Where are you using this expression? Is it for a Dashboard? Beyond the count, what else are you looking to show?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 18:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355298#M56170</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-11-30T18:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find point feature count in multi-polygon feature layer with Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355299#M56171</link>
      <description>&lt;P&gt;I'm using this expression in a label. It's in a map used in an Experience Builder. There's more fancy stuff I think about, but this is just to start.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 18:28:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/find-point-feature-count-in-multi-polygon-feature/m-p/1355299#M56171</guid>
      <dc:creator>ellipsol</dc:creator>
      <dc:date>2023-11-30T18:28:34Z</dc:date>
    </item>
  </channel>
</rss>

