<?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 Intersection between two points in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244637#M49554</link>
    <description>&lt;P&gt;using Attribute Rules you could do something along the lines of this:&lt;/P&gt;&lt;P&gt;var pole = FeatureSetbyName($datastore,"points",["Name"])&lt;BR /&gt;var line = buffer($feature,.1)&lt;BR /&gt;var ab = Intersects(pole, line)&lt;BR /&gt;var line_name = ''&lt;BR /&gt;for (var a in ab){&lt;BR /&gt;var pole_name = DomainName(a, "Name")&lt;BR /&gt;line_name += pole_name +'-'}&lt;BR /&gt;return left(line_name, count(line_name)-1);&lt;/P&gt;&lt;P&gt;You could also calculate the values after the fact, if you are not able to use attribute rules (e.x. using ArcGIS Online Hosted Feature Layers)&lt;/P&gt;&lt;P&gt;The is what it looks like labeling the created features in ArcGIS Pro&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_0-1672430617278.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59557iE835D17223711B3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarkBockenhauer_0-1672430617278.png" alt="MarkBockenhauer_0-1672430617278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2022 20:06:14 GMT</pubDate>
    <dc:creator>MarkBockenhauer</dc:creator>
    <dc:date>2022-12-30T20:06:14Z</dc:date>
    <item>
      <title>Arcade Intersection between two points</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244597#M49552</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a Field Maps project that is requiring some Arcade writing. Our fielders want the name of a line to be auto-populated. We are working in utilities. The fielders are going down a street, adding a pole/point feature, naming it, move on - next pole/point feature, naming it - then draw a polyline/span connecting the two. The ask is that the polyline/span will auto-populate the Span to be "name of pole - name of pole". Example: first pole is 12345, second pole is pole number 12346, so the span will be 12345-12346.&lt;/P&gt;&lt;P&gt;I'm aware of Intersect, I have used that before to populate data from a singular entity onto another intersecting entity. I've hit a mental block with this question because these are two points being used to intersect one line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a screenshot as an example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 17:33:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244597#M49552</guid>
      <dc:creator>KWilliams</dc:creator>
      <dc:date>2022-12-30T17:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersection between two points</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244637#M49554</link>
      <description>&lt;P&gt;using Attribute Rules you could do something along the lines of this:&lt;/P&gt;&lt;P&gt;var pole = FeatureSetbyName($datastore,"points",["Name"])&lt;BR /&gt;var line = buffer($feature,.1)&lt;BR /&gt;var ab = Intersects(pole, line)&lt;BR /&gt;var line_name = ''&lt;BR /&gt;for (var a in ab){&lt;BR /&gt;var pole_name = DomainName(a, "Name")&lt;BR /&gt;line_name += pole_name +'-'}&lt;BR /&gt;return left(line_name, count(line_name)-1);&lt;/P&gt;&lt;P&gt;You could also calculate the values after the fact, if you are not able to use attribute rules (e.x. using ArcGIS Online Hosted Feature Layers)&lt;/P&gt;&lt;P&gt;The is what it looks like labeling the created features in ArcGIS Pro&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_0-1672430617278.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59557iE835D17223711B3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarkBockenhauer_0-1672430617278.png" alt="MarkBockenhauer_0-1672430617278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 20:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244637#M49554</guid>
      <dc:creator>MarkBockenhauer</dc:creator>
      <dc:date>2022-12-30T20:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersection between two points</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244659#M49555</link>
      <description>&lt;P&gt;Thank you for taking the time to look at my question. I am using AGOL hosted feature layers. I will need to run this on the backend. I will save that code for future use. Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 21:52:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1244659#M49555</guid>
      <dc:creator>KWilliams</dc:creator>
      <dc:date>2022-12-30T21:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersection between two points</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1381026#M57421</link>
      <description>&lt;P&gt;Trying not to use attribute rule for online-live layers. Can either of you elaborate how to get this code to work with calculation on an layer in AGOL? I tried both in Pro as field calculate and AGOL calculate. Keep getting error on line1 not finding the layer..&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2733"&gt;@MarkBockenhauer&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/519083"&gt;@KWilliams&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 14:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1381026#M57421</guid>
      <dc:creator>Adam_Bourque</dc:creator>
      <dc:date>2024-02-12T14:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersection between two points</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1381045#M57422</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/593014"&gt;@Adam_Bourque&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Because I was using an AGOL hosted feature layer, I was not able to use to the code provided by Mark to set up the calculation to happen during field collection. Instead I came up with my own solution in ArcPro when post-processing the data. I also did not set up the attribute rules as suggested because this was a one time process. What I did do, I hope its not too wordy:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download all AGOL layers to local, save to geodatabase&lt;/LI&gt;&lt;LI&gt;Spatial Join my Poles (Join Features) to my Spans (Target Features), Join one to many, Match Option: Intersect&lt;/LI&gt;&lt;LI&gt;From Output lines feature, run summary statistics on Target_FID to see how many points each line segment intersects with; Field: OBJECTID, Statistic Type: Count, Case Field: TARGET_FID. Output will be for each ObjectID, provide the total count of TARGET_FID per single ObjectID (Most will be 2, some will be 3+) (keep in mind I am working with poles and the lines between the poles). Def query your output lines feature to where Target_FID count = 2 for the next few steps.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;From Output feature, run summary statistics on Target_FID again, this time get minimum Target_FID. Output will be for each ObjectID, provide the minimum Target_FID. So where the line intersects with two+ points, the summary will provide you the lower value. Save that summary statistic in map.&lt;/LI&gt;&lt;LI&gt;Likewise, run the same tool but get the maximum Target_FID. So where the line intersects with two +points, the summary will provide you with the higher value. Save the summary statistic in map.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;You now have the following: where your line file intersects with two points, you have the ObjectID of each point.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;I'm not sure how to run this for 3+ intersections, I did those manually.&lt;/LI&gt;&lt;LI&gt;On your original, unjoined line file, add the field: ID (or whatever you're using), table join this with the summary statistic minimum using ObjectID, then field calculate over that minimum value. Remove join&lt;/LI&gt;&lt;LI&gt;Rerun that table join but instead join to the summary statistic maximum using ObjectID, then field calculate over the maximum value, adding a - (dash) in the middle.&lt;/LI&gt;&lt;LI&gt;Remove join. Now for each line that intersects with two points, you have the concatenated ObjectID-ObjectID.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 15:08:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1381045#M57422</guid>
      <dc:creator>KWilliams</dc:creator>
      <dc:date>2024-02-12T15:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersection between two points</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1384305#M57562</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/519083"&gt;@KWilliams&lt;/a&gt;&amp;nbsp;I will end up using this method like I have similarly before if I can't get an arcade expression to work.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 13:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersection-between-two-points/m-p/1384305#M57562</guid>
      <dc:creator>Adam_Bourque</dc:creator>
      <dc:date>2024-02-20T13:28:26Z</dc:date>
    </item>
  </channel>
</rss>

