<?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 function with FeatureSetByPortalItem in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1610343#M95427</link>
    <description>&lt;P&gt;Today is Wednesday.&amp;nbsp; On Tuesday, the validate worked (for the most part - sometimes it would throw the error but if I clicked OK enough times, the Arcade Expression builder would close and it would work - [insert facepalm]).&amp;nbsp; I tried a couple of times today and no errors are being thrown.&lt;/P&gt;&lt;P&gt;The only thing that changed was a Windows 11 update so let's blame this problem on Microsoft and call it a day!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2025 12:36:34 GMT</pubDate>
    <dc:creator>PLadd</dc:creator>
    <dc:date>2025-04-30T12:36:34Z</dc:date>
    <item>
      <title>Arcade Expression Intersect function with FeatureSetByPortalItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1609346#M95312</link>
      <description>&lt;P&gt;This is stupid but I'm finding the Arcade Intersect function to be fickle - some days it'll work, some days it'll not work.&lt;/P&gt;&lt;P&gt;Intersects will work with $map and $datasource but not Portal.&amp;nbsp; Esri has told me using Portal is an enhancement.&amp;nbsp; That's fine but sometimes it works and sometimes it doesn't.&amp;nbsp; That seems to remove the "science" from computer science.&lt;/P&gt;&lt;P&gt;//this works&lt;BR /&gt;var myFeatures = FeatureSetByName($map, myLayer, ['*'], true);&lt;BR /&gt;var intersectedZone = First(Intersects($feature, myFeatures));&lt;BR /&gt;return intersectedZone["District_N"];&lt;/P&gt;&lt;P&gt;//this works&lt;BR /&gt;var myFeatures = FeatureSetByName($datasource, myDataSource, ['*'], true);&lt;BR /&gt;var intersectedZone = First(Intersects($feature, myFeatures));&lt;BR /&gt;return intersectedZone["District_N"];&lt;/P&gt;&lt;P&gt;//this worked yesterday but not today&lt;BR /&gt;var myFeatures = FeatureSetByPortalItem(myPortal, myID, 1, ['*'], true);&lt;BR /&gt;var intersectedZone = First(Intersects($feature, myFeatures));&lt;BR /&gt;return intersectedZone["District_N"];&lt;/P&gt;&lt;P&gt;Since it worked yesterday, it's been published to a map service and is working fine in a web map. Also, in ArcGIS Pro, I have other Arcade Expressions using this some configuration with Portal and it works wonderfully in ArcGIS Pro (unless I open the expression and try to validate or click OK.&lt;/P&gt;&lt;P&gt;The error is "Invalid expression.&amp;nbsp; Error on line 1. General evaluation error."&amp;nbsp; Sadly line 1 is a comment&lt;/P&gt;&lt;P&gt;//GET THE INTERSECTING LAYER&lt;/P&gt;&lt;P&gt;If I put a "return;" before the Intersect function, it validates.&amp;nbsp; So I know this is the error.&amp;nbsp; Plus, I can also do "return Count(myFeatures);" before the Intersect function and it'll validate and work.&lt;/P&gt;&lt;P&gt;Why did it work yesterday and not today?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 19:06:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1609346#M95312</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2025-04-25T19:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Intersect function with FeatureSetByPortalItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1609358#M95318</link>
      <description>&lt;P&gt;UPDATE: I did a little more digging and it seems to be a problem with all Geometry functions in Arcade.&amp;nbsp; I tried Overlaps, Touches, and Within and none of these will validate.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 19:37:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1609358#M95318</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2025-04-25T19:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Intersect function with FeatureSetByPortalItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1609727#M95359</link>
      <description>&lt;P&gt;Today the Intersects function validates.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":upside_down_face:"&gt;🙃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For those keeping a scorecard, I'll let you know tomorrow if it'll validate. . . .&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 17:38:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1609727#M95359</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2025-04-28T17:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Intersect function with FeatureSetByPortalItem</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1610343#M95427</link>
      <description>&lt;P&gt;Today is Wednesday.&amp;nbsp; On Tuesday, the validate worked (for the most part - sometimes it would throw the error but if I clicked OK enough times, the Arcade Expression builder would close and it would work - [insert facepalm]).&amp;nbsp; I tried a couple of times today and no errors are being thrown.&lt;/P&gt;&lt;P&gt;The only thing that changed was a Windows 11 update so let's blame this problem on Microsoft and call it a day!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 12:36:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-intersect-function-with/m-p/1610343#M95427</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2025-04-30T12:36:34Z</dc:date>
    </item>
  </channel>
</rss>

