<?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 Expression (Intersect two polygons layers) in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1163049#M45501</link>
    <description>&lt;P&gt;Any chance you can link to this idea so I can give it my support?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;I have created an idea to provide access to the location clicked, but it is not implemented yet. Hopefully, this will happen soon.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Apr 2022 14:47:11 GMT</pubDate>
    <dc:creator>CBarrett</dc:creator>
    <dc:date>2022-04-11T14:47:11Z</dc:date>
    <item>
      <title>Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1099288#M42213</link>
      <description>&lt;P&gt;HI I want to write an Arcade expression in a pop up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two polygon layers in my web map&lt;/P&gt;&lt;P&gt;Suburb polygon and Flood polygon&lt;/P&gt;&lt;P&gt;I want to appear the name of the suburb in the flood event pop up&amp;nbsp; when click on the suburb layer&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expression is&lt;/P&gt;&lt;P&gt;var SI = FeatureSetByName($map,"Suburb")&lt;BR /&gt;var int = First(Intersects($feature, SI))&lt;BR /&gt;return int.Suburb&lt;/P&gt;&lt;P&gt;The expression returns a suburb name but it returns the same name all the time for example "suburb 1". If I click in another suburb it still&amp;nbsp; return the name "suburb 1"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 07:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1099288#M42213</guid>
      <dc:creator>Greta</dc:creator>
      <dc:date>2021-09-17T07:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1101219#M42273</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/280510"&gt;@Greta&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you click on the flood area you want to see the suburb at the location where you clicked. The problem is that when you start with the flood area polygon it will use the entire polygon to see what suburbs it intersects with and when your flood area polygon is large it will intersect with a large number of suburbs. At this moment it is not possible in the Arcade expression to have access to the location where the user clicked and therewith being able to return a single suburb at the location. You will have in the pop-up a button to go through all the features at the location where the user clicked and have access to the suburb, but not as you want in the pop-up of the flood area:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XanderBakker_0-1632404038091.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23705iCBDDBFF6E85B5883/image-size/medium?v=v2&amp;amp;px=400" role="button" title="XanderBakker_0-1632404038091.png" alt="XanderBakker_0-1632404038091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You could also go a little further and present information of multiple suburbs and the % of the area that the flood area covers the suburb. There are many possibilities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created an idea to provide access to the location clicked, but it is not implemented yet. Hopefully, this will happen soon.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 13:45:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1101219#M42273</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-09-23T13:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1105831#M42492</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 09:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1105831#M42492</guid>
      <dc:creator>Greta</dc:creator>
      <dc:date>2021-10-08T09:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1118606#M43041</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a similar question but I'm not sure despite answer&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp; if it's possible or not. So I will describe the case. Two polygon layers, one with districts (wijken) and the other with smaller polygons, neighbourhoods (buurten). I want the name of the district to apear in the popup of the neighbourhood. I tried several Arcade&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/" target="_blank" rel="noopener"&gt;Geometry Functions&lt;/A&gt; Contains, Within and Intersects.&lt;/P&gt;&lt;P&gt;var wijken=FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310")&lt;BR /&gt;var wijk=Intersects(wijken,$feature)&lt;BR /&gt;return wijk&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 11:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1118606#M43041</guid>
      <dc:creator>Ade_Bruijn</dc:creator>
      <dc:date>2021-11-19T11:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1118752#M43049</link>
      <description>&lt;P&gt;Hoi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/74921"&gt;@Ade_Bruijn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Your expression is close, but when you intersect the "wijken" layer with a "buurt", you obtain a featureset or in other words a collection of features even if there is only one feature. You will have to take for instance the first wijk found and then you can access the attribute that contains the name fo the "wijk".&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var wijken = FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310");
var wijk = First(Intersects(wijken, $feature));
return wijk["VeldNaamVanVeldMetWijkNaam"];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a potential catch... it is possible that a neighboring "wijk" is also returned and to avoid obtaining the wrong "wijk" name you could do a negative buffer to reduce the size of the "buurt" (current feature)&amp;nbsp; and ensure that you get the right "wijk". An example you can find below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var wijken = FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310");
var buf = Buffer($feature, -1, "meter");
var wijk = First(Intersects(wijken, buf));
return wijk["VeldNaamVanVeldMetWijkNaam"];&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:02:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1118752#M43049</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-11-19T17:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1119037#M43061</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Exactly what I wanted to achieve. And of course I needed also the negative buffer. Simple but effective trick.&lt;/P&gt;&lt;P&gt;Groeten Anne&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 12:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1119037#M43061</guid>
      <dc:creator>Ade_Bruijn</dc:creator>
      <dc:date>2021-11-21T12:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1163049#M45501</link>
      <description>&lt;P&gt;Any chance you can link to this idea so I can give it my support?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;I have created an idea to provide access to the location clicked, but it is not implemented yet. Hopefully, this will happen soon.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 14:47:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1163049#M45501</guid>
      <dc:creator>CBarrett</dc:creator>
      <dc:date>2022-04-11T14:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression (Intersect two polygons layers)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1163248#M45517</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/536794"&gt;@CBarrett&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support. You can find the link below:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-internal-ideas/provide-the-location-clicked-in-the-pop-up-to-the/idi-p/1087588" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-internal-ideas/provide-the-location-clicked-in-the-pop-up-to-the/idi-p/1087588&lt;/A&gt;&amp;nbsp;(although this is an internal idea, and it might not be available to everyone)...&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 20:35:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-intersect-two-polygons-layers/m-p/1163248#M45517</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2022-04-11T20:35:08Z</dc:date>
    </item>
  </channel>
</rss>

