<?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 - Intersecting Polygons - return multiple answers if multiple. in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1509588#M60473</link>
    <description>&lt;P&gt;My apologies...I had the syntax incorrect. Give this a try (using your own layer and field names)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersectLayer = OrderBy(
  Intersects(
    FeatureSetByName($map, "other layer"),
    Buffer($feature, -1, "feet")
  ),
  "sortField DESC"
);
var results = [];
for (var f in intersectLayer) {
  results[Count(results)] = f["displayField"];
}
var output = Concatenate(results, ", ");&lt;/LI-CODE&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>Wed, 24 Jul 2024 20:38:17 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2024-07-24T20:38:17Z</dc:date>
    <item>
      <title>Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635135#M31635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hi&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" class="" data-containerid="-1" data-containertype="-1" data-objectid="3100" data-objecttype="3" href="https://community.esri.com/people/xander_bakker" style="color: #287433; background-color: transparent; border: 0px; font-weight: inherit; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;Xander Bakker&lt;/A&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I have a parcel feature layer and a soils feature layer in my webmap. I'm trying to apply the arcade to my parcels layer so that when a parcel is clicked it will give me the corresponding soils to that parcel. The issue is that there could be more than one soil per parcel. The expression I currently have applied to my parcel feature class is this:&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;var intersectLayer = Intersects(FeatureSetByName($map,"STATSGO2Soils"), $feature)&lt;BR /&gt;for(var f in intersectLayer){&lt;BR /&gt;return f.muname&lt;BR /&gt;}&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;But it will only return one of my soils into the parcel and will not bring in multiple soils names. Is there a way to do&amp;nbsp;what I'm hoping to do?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 18:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635135#M31635</guid>
      <dc:creator>TrishaSchlake</dc:creator>
      <dc:date>2019-12-12T18:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635136#M31636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"STATSGO2Soils"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; results &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; f &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; intersectLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;results &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    results &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;muname&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    results &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;muname&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; results&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This would be another way&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var intersectLayer = Intersects(FeatureSetByName($map,"STATSGO2Soils"), $feature)
var results = [];
for(var f in intersectLayer){
  results[Count(results)] = f.muname;
}
return Concatenate(results, ", ");‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635136#M31636</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-12T03:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635137#M31637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ken! That is exactly what I needed. I appreciate the quick help!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 19:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635137#M31637</guid>
      <dc:creator>TrishaSchlake</dc:creator>
      <dc:date>2019-12-12T19:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635138#M31638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to help (and check out the alternate code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't forget to mark the question as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 19:36:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/635138#M31638</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2019-12-12T19:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1490613#M59694</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a very helpful code, but I am wondering is there a way to add a -1ft buffer or something? I am getting all polygons that share a border with the parcel but are not necessarily in the parcel.&lt;/P&gt;&lt;P&gt;Also would it be possible to add an OrderBy ASC to the script?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 15:24:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1490613#M59694</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2024-06-12T15:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1490674#M59695</link>
      <description>&lt;P&gt;You can use additional &lt;A href="https://developers.arcgis.com/arcade/guide/featuresets/#chain-featureset-operations" target="_self"&gt;chaining&lt;/A&gt; to add those extra functions to get the intersect layer&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersectLayer = OrderBy(
  Intersects(
    Buffer(
      FeatureSetByName(
        $map,
        "STATSGO2Soils"
      ),
      -1, 
      'feet'
    ), 
    $feature
  ),
 'Muname DESC'
);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jun 2024 15:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1490674#M59695</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-06-12T15:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1491065#M59704</link>
      <description>&lt;P&gt;Thanks for coming back to this Ken!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 21:56:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1491065#M59704</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2024-06-12T21:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1509421#M60467</link>
      <description>&lt;P&gt;Hey Ken, sorry to come back, I am attempting to utilize this section in the above script using my own values but am getting the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Invalid Expression. Error on line 19. Identifier expected.&lt;/LI-CODE&gt;&lt;LI-CODE lang="c"&gt;var intersectLayer = OrderBy(
  Intersects(
    Buffer(
      FeatureSetByName(
        $map,
        "STATSGO2Soils"
      ),
      -1, 
      'feet'
    ), 
    $feature
  ),
 'Muname DESC'
);
var results = [];
for(var f in intersectLayer){
  results[Count(results)] = f.muname;
}
return Concatenate(results, ", ");‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 16:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1509421#M60467</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2024-07-24T16:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1509588#M60473</link>
      <description>&lt;P&gt;My apologies...I had the syntax incorrect. Give this a try (using your own layer and field names)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersectLayer = OrderBy(
  Intersects(
    FeatureSetByName($map, "other layer"),
    Buffer($feature, -1, "feet")
  ),
  "sortField DESC"
);
var results = [];
for (var f in intersectLayer) {
  results[Count(results)] = f["displayField"];
}
var output = Concatenate(results, ", ");&lt;/LI-CODE&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>Wed, 24 Jul 2024 20:38:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1509588#M60473</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-07-24T20:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1510140#M60496</link>
      <description>&lt;P&gt;Any idea what is causing the following error? I ran the Check Geometry on both layers participating in this intersect with 0 errors.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ERROR 002717: Invalid Arcade expression, Arcade error: Invalid search geometry, Script line: 9
Failed to execute (CalculateField).&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 16:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1510140#M60496</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2024-07-25T16:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1510142#M60497</link>
      <description>&lt;P&gt;Could you post your code to see what's on line 9? I'm wondering if there's a null geometry in your data. I tested this on the USA States and USA Major Cities dataset from the Living Atlas and didn't get any errors.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 16:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1510142#M60497</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-07-25T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Intersecting Polygons - return multiple answers if multiple.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1510336#M60510</link>
      <description>&lt;P&gt;Deleting previous chat cause it wasn't relevant.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;Thank you for all your help! I figured it out. The layer I was using had the ever dreaded&amp;nbsp;&lt;STRONG&gt;Slivers&lt;/STRONG&gt; in it that were less than 1ft causing the geometry error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code it working as expected when I reduced the negative buffer.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 23:19:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersecting-polygons-return-multiple/m-p/1510336#M60510</guid>
      <dc:creator>Amarz</dc:creator>
      <dc:date>2024-07-25T23:19:02Z</dc:date>
    </item>
  </channel>
</rss>

