<?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: Attribute rules, Count - Intersect no working. in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174763#M55238</link>
    <description>&lt;P&gt;It works, thank you so much! (:&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2022 19:15:35 GMT</pubDate>
    <dc:creator>EduardoDiaz</dc:creator>
    <dc:date>2022-05-17T19:15:35Z</dc:date>
    <item>
      <title>Attribute rules, Count - Intersect no working.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174412#M55206</link>
      <description>&lt;P&gt;Attribute rules in ArcGIS Pro 2.9.3.&lt;/P&gt;&lt;P&gt;I designed a rule that extracts a field to concatenate it with the result of the intersection of a point layer, the problem is that the result of the intersection count is always one. The first extract has no errors.&lt;/P&gt;&lt;P&gt;Rule on field cve_punto:&lt;/P&gt;&lt;P&gt;var intersectMUN = Intersects(FeatureSetbyName($datastore,"BajaCalifornia"), $Feature);&lt;BR /&gt;var mun = "";&lt;BR /&gt;for(var f in intersectMUN){&lt;BR /&gt;mun = (f.CVE_MUN) +" - "+Count(intersectMUN);&lt;BR /&gt;}&lt;BR /&gt;return mun;&lt;/P&gt;&lt;P&gt;______________&lt;/P&gt;&lt;P&gt;Triggers: Insert&lt;/P&gt;&lt;P&gt;BajaCalifornia - Polygon Layer&lt;/P&gt;&lt;P&gt;$Feature - Points Layer&lt;/P&gt;&lt;P&gt;The expected result is something like: 001 - 1, 001 - 2, 001 - 3; where the sequence 1,2,3 grow when a new point is added. On the other hand I need it to be a sequence for each CVE_MUN identifier, 001 - 1, 001 - 2, 001 -3; 002 - 1, 002 - 2, 002 - n.&lt;/P&gt;&lt;P&gt;I'm a newbie with Arcade.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 00:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174412#M55206</guid>
      <dc:creator>EduardoDiaz</dc:creator>
      <dc:date>2022-05-17T00:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rules, Count - Intersect no working.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174463#M55216</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're halfway there.&lt;/P&gt;&lt;P&gt;You're using the count of the intersection between your point $feature and the polygons, which is always 1 (assuming no overlapping polygons). When you got your polygon feature, you have to intersect that again with the point fc to get the point count:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// get intersecting polygons
var intersectMUN = Intersects(FeatureSetbyName($datastore,"BajaCalifornia"), $feature);
// get the first polygon or return null
var firstMUN = First(intersectMUN)
if(firstMUN == null) { return null }

// get the points intersecting the polygon
var intersectPoints = Intersects(FeatureSetByName($datastore, "POINTS"), firstMUN);

// return "PolygonID - PointCount"
return (firstMUN.CVE_MUN) + " - " + Count(intersectPoints);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1652775444776.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41463i48693F0EBD3F4DF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1652775444776.png" alt="JohannesLindner_1-1652775444776.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 08:17:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174463#M55216</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-05-17T08:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rules, Count - Intersect no working.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174763#M55238</link>
      <description>&lt;P&gt;It works, thank you so much! (:&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 19:15:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-count-intersect-no-working/m-p/1174763#M55238</guid>
      <dc:creator>EduardoDiaz</dc:creator>
      <dc:date>2022-05-17T19:15:35Z</dc:date>
    </item>
  </channel>
</rss>

