<?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: Having problems getting a spatial join to work on a Field Maps calculated expression in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203917#M6327</link>
    <description>&lt;P&gt;Here's what's weird. Despite that warning message (see my preceding post), the Arcade editor in Map Viewer Forms supports Feature Set functions. When I click the Test button, it works correctly. Furthermore, you can browse the functions on the right pane of the editor and select Feature Set functions for the various map layers.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 19:44:46 GMT</pubDate>
    <dc:creator>ChipMorgan</dc:creator>
    <dc:date>2022-08-17T19:44:46Z</dc:date>
    <item>
      <title>Having problems getting a spatial join to work on a Field Maps calculated expression</title>
      <link>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203781#M6324</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I'd like to auto-fill the county for the current location when I create a feature in AGOL (New) Map Viewer, following the general approach laid out here: &lt;A href="https://community.esri.com/t5/arcgis-online-blog/overlapping-features-in-pop-ups-quick-introduction/ba-p/890862" target="_self"&gt;https://community.esri.com/t5/arcgis-online-blog/overlapping-features-in-pop-ups-quick-introduction/ba-p/890862&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Here's what I have:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;var Counties=Intersects(FeatureSetByName($map,"USA Counties (Generalized)"),$feature)&lt;BR /&gt;for (var county in Counties){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return county.NAME&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; In the Arcade editor inside Field Maps editor, the "Test" button confirms the proper syntax and returns the correct (single) value. However, when I create a feature in the AGOL (New) Map Viewer, nothing shows up in this field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I've isolated that the Intersects (or FeatureSetByName) function is causing issues, though I'm not sure what the problem is. The following troubleshooting example returns nothing in AGOL (it should always return "test"):&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;var Counties=Intersects(FeatureSetByName($map,"USA Counties (Generalized)"),$feature)&lt;BR /&gt;return "test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I did confirm that the following code works, just as a sanity test:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;return "test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Oh, and I did try the FeatureSetByID function instead of FeatureSetByName, with similar results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 15:42:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203781#M6324</guid>
      <dc:creator>ChipMorgan</dc:creator>
      <dc:date>2022-08-17T15:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems getting a spatial join to work on a Field Maps calculated expression</title>
      <link>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203910#M6325</link>
      <description>&lt;P&gt;Curiously, that same logic actually works as an attribute expression in a pop-up in the same map. Odd.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:31:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203910#M6325</guid>
      <dc:creator>ChipMorgan</dc:creator>
      <dc:date>2022-08-17T19:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems getting a spatial join to work on a Field Maps calculated expression</title>
      <link>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203912#M6326</link>
      <description>&lt;P&gt;Just stumbled across the issue. I had been using the form editor in Field Maps. When I opened the Forms menu on Map Viewer (which does show the same forms as in Field Maps), I got the following warning:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;Expression compatibility&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;Calculated expressions that use Feature Sets are not supported in Map Viewer.&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Dangit.&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203912#M6326</guid>
      <dc:creator>ChipMorgan</dc:creator>
      <dc:date>2022-08-17T19:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems getting a spatial join to work on a Field Maps calculated expression</title>
      <link>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203917#M6327</link>
      <description>&lt;P&gt;Here's what's weird. Despite that warning message (see my preceding post), the Arcade editor in Map Viewer Forms supports Feature Set functions. When I click the Test button, it works correctly. Furthermore, you can browse the functions on the right pane of the editor and select Feature Set functions for the various map layers.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/having-problems-getting-a-spatial-join-to-work-on/m-p/1203917#M6327</guid>
      <dc:creator>ChipMorgan</dc:creator>
      <dc:date>2022-08-17T19:44:46Z</dc:date>
    </item>
  </channel>
</rss>

