<?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 Intersect Expression not working in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303046#M53076</link>
    <description>&lt;P&gt;When using geometry-based functions in Arcade, the accuracy of the result can be based on the view scale. Can you try buffering the line by a tiny amount before intersecting? I find that sometimes helps.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 16:02:29 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2023-06-26T16:02:29Z</dc:date>
    <item>
      <title>Arcade Intersect Expression not working</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303035#M53074</link>
      <description>&lt;P&gt;This seems like a strange issue. I have 2 lines that I'm trying to use intersect with. In the screenshot below I have a gravity main in red that is crossed by another line in blue. It might be hard to see in the screenshot, but they 100% cross.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MPach_0-1687793787518.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/74184i7E0A2F23041FAAEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MPach_0-1687793787518.png" alt="MPach_0-1687793787518.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is the code expression that I'm using and I can't get any of these lines that I have crossing to return a value. That being said I have also tried the Crosses and Touches function and neither of those work either. I can't figure out why it won't work. I don't know&amp;nbsp; if it make a difference at all, but the capdepth (capacity depth) field I'm iterating through is a numeric field. There are no indications upon testing this expression that indicate anything is wrong with the expression.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ar phase1 = FeatureSetById($map, 'Phase 1 -- 2025_c1dde3')

var phase1_capDepth = Intersects(phase1, $feature)

var phase1_details = ''

for(var row in phase1_capDepth) {
    phase1_details = phase1_details + row.capdepth
}

return phase1_details&lt;/LI-CODE&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 15:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303035#M53074</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2023-06-26T15:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersect Expression not working</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303046#M53076</link>
      <description>&lt;P&gt;When using geometry-based functions in Arcade, the accuracy of the result can be based on the view scale. Can you try buffering the line by a tiny amount before intersecting? I find that sometimes helps.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:02:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303046#M53076</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-06-26T16:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersect Expression not working</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303096#M53083</link>
      <description>&lt;P&gt;So I've tried two things and I think I'm doing it right, but I'm not sure so I'll post the code bit. First I'm trying to buffer the gravity mains, which is the layer that has the expression applied to it's pop up.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var phase1 = FeatureSetById($map, 'Phase 1 -- 2025_c1dde3')

var buffer_ph1 = Buffer($feature, 20, 'feet')

var phase1_capDepth = Intersects(phase1, buffer_ph1)

var phase1_details = ''

for(var row in phase1_capDepth) {
    phase1_details = phase1_details + row.capdepth
}

return phase1_details&lt;/LI-CODE&gt;&lt;P&gt;I also tried it the other way around to buffer the phase 1 line that is crossing the gravity main, but neither seems to work. I've also tired a few different buffer distances.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var phase1 = FeatureSetById($map, 'Phase 1 -- 2025_c1dde3')

var buffer_ph1 = Buffer(phase1, 20, 'feet')

var phase1_capDepth = Intersects(buffer_ph1, $feature)

var phase1_details = ''

for(var row in phase1_capDepth) {
    phase1_details = phase1_details + row.capdepth
}

return phase1_details&lt;/LI-CODE&gt;&lt;P&gt;Hopefully I didn't mess up my variables doing this&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I made a test file and it seems to be working in that, so I might just try to start over again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have one more question though. Is it a problem if you have multiple expressions on one layer that use Intersect to pull data from many different layers? I suppose that might be my problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 17:35:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1303096#M53083</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2023-06-26T17:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersect Expression not working</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1338721#M55118</link>
      <description>&lt;P&gt;Hi MPach, did you ever end up finding a solution?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 16:48:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1338721#M55118</guid>
      <dc:creator>Oliver_Sandoval_e</dc:creator>
      <dc:date>2023-10-17T16:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersect Expression not working</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1339235#M55167</link>
      <description>&lt;P&gt;I'll let you know after I test it. Unfortunately, I got pulled on to like 3-4 other tasks before I could finish testing this. Thank you for reminding me though.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 17:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-expression-not-working/m-p/1339235#M55167</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2023-10-18T17:20:15Z</dc:date>
    </item>
  </channel>
</rss>

