<?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 Intersect Arcade Expression Test execution error in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expression-test-execution-error/m-p/1589537#M63801</link>
    <description>&lt;P&gt;I have an Intersect Arcade Expression that I'm adding to a layer with a bunch of small polygons to intersect a march larger polygon.&amp;nbsp; I'm doing this across two different layers within two different services published as Map services to my portal.&amp;nbsp; One layer is working and one is not.&lt;/P&gt;&lt;P&gt;The below is NOT working.&amp;nbsp; When I run this I get "&lt;SPAN&gt;Test execution error: Unknown Error. Verify test data." when I run it.&amp;nbsp; I found if I delete the First in the Intersect clause then I get "Test execution error: Execution error - Cannot access value using a key of this type. Verify test data."&amp;nbsp; In both the working and not working layer, they are polygons and the fields that I am displaying are Integer Fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var cra_fields = [
  'CRA_AREA'
]

var craa = FeatureSetByPortalItem(Portal('https://######/'), 'ae5d1369bf0942eda25e42aaac316677', 4)
var incra = First(Intersects($feature, craa))

If(IsEmpty(incra)){
  return 'Not within CRA Area'
} else {
  return `CRA Area: ${incra['CRA_AREA']}`
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;This one is working and is exactly the same code, only a different layer.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var anx_fields = [
  'AnnexDate',
  'AnnexYear',
]
var annex = FeatureSetByPortalItem(Portal('https://####/'), 'a2ef88e45eb34494859820e5295b2b98', 10)
var inanx = First(Intersects($feature, annex))

If(IsEmpty(inanx)){
  return 'No Annexation Data'
} else {
  return `Annexation Year: ${inanx['AnnexYear']}`
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2025 16:40:35 GMT</pubDate>
    <dc:creator>LindseyStone</dc:creator>
    <dc:date>2025-02-26T16:40:35Z</dc:date>
    <item>
      <title>Intersect Arcade Expression Test execution error</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expression-test-execution-error/m-p/1589537#M63801</link>
      <description>&lt;P&gt;I have an Intersect Arcade Expression that I'm adding to a layer with a bunch of small polygons to intersect a march larger polygon.&amp;nbsp; I'm doing this across two different layers within two different services published as Map services to my portal.&amp;nbsp; One layer is working and one is not.&lt;/P&gt;&lt;P&gt;The below is NOT working.&amp;nbsp; When I run this I get "&lt;SPAN&gt;Test execution error: Unknown Error. Verify test data." when I run it.&amp;nbsp; I found if I delete the First in the Intersect clause then I get "Test execution error: Execution error - Cannot access value using a key of this type. Verify test data."&amp;nbsp; In both the working and not working layer, they are polygons and the fields that I am displaying are Integer Fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var cra_fields = [
  'CRA_AREA'
]

var craa = FeatureSetByPortalItem(Portal('https://######/'), 'ae5d1369bf0942eda25e42aaac316677', 4)
var incra = First(Intersects($feature, craa))

If(IsEmpty(incra)){
  return 'Not within CRA Area'
} else {
  return `CRA Area: ${incra['CRA_AREA']}`
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;This one is working and is exactly the same code, only a different layer.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var anx_fields = [
  'AnnexDate',
  'AnnexYear',
]
var annex = FeatureSetByPortalItem(Portal('https://####/'), 'a2ef88e45eb34494859820e5295b2b98', 10)
var inanx = First(Intersects($feature, annex))

If(IsEmpty(inanx)){
  return 'No Annexation Data'
} else {
  return `Annexation Year: ${inanx['AnnexYear']}`
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 16:40:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expression-test-execution-error/m-p/1589537#M63801</guid>
      <dc:creator>LindseyStone</dc:creator>
      <dc:date>2025-02-26T16:40:35Z</dc:date>
    </item>
  </channel>
</rss>

