<?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: Identify point ID at start of line using attribute rule in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1544939#M88803</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/706634"&gt;@Chris_S&lt;/a&gt;&amp;nbsp;you are the MVP! Thank you for sharing. This information here was exactly what I was looking for. I learned something new about Arcade's potential.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 19:55:56 GMT</pubDate>
    <dc:creator>NourSalamJMT</dc:creator>
    <dc:date>2024-10-02T19:55:56Z</dc:date>
    <item>
      <title>Identify point ID at start of line using attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1314816#M71666</link>
      <description>&lt;P&gt;I have two feature classes: One contains manholes (points) and the other contains sewer mains (polyline). I need to gather the Unit ID (text field) assigned to the manhole at the start of the sewer main and place it into a field ('StartID') in the sewer main table.&lt;/P&gt;&lt;P&gt;I'm trying to create an attribute rule that will do such a thing. Can anyone provide some insight as I'm not having any values returned? Thanks in advance.&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;var manholeID = FeatureSetByName($datastore, 'Exported_Manholes', ['UNITID'], true)&lt;BR /&gt;var start_point = Geometry($feature).paths[0][0]&lt;BR /&gt;&lt;BR /&gt;if(Intersects(start_point, $feature)){&lt;BR /&gt;return manholeID&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return ERROR&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 21:17:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1314816#M71666</guid>
      <dc:creator>Chris_S</dc:creator>
      <dc:date>2023-08-02T21:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Identify point ID at start of line using attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1315650#M71770</link>
      <description>&lt;P&gt;I figured this out and thought I'd share.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context:&lt;/P&gt;&lt;P&gt;Manholes (points) each have a UNITID. For example one manhole is A1-123 and another manhole is A1-456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sewer Mains have a start point and an end point. The start point is stored in a column called UNITID and the end point in another column called UNITID2 in the Sewer Mains attribute table.&lt;/P&gt;&lt;P&gt;To capture the UNITID from the "start" manhole, I created the following attribute rule for the UNITID field in the Sewer Mains attribute table:&lt;/P&gt;&lt;P&gt;var manhole = FeatureSetByName($datastore, 'Exported_Manholes', ['*'], true)&lt;BR /&gt;var start_point = Geometry($feature).paths[0][0]&lt;BR /&gt;var intersectLayer = Intersects(manhole, start_point)&lt;/P&gt;&lt;P&gt;for (var f in intersectLayer){&lt;BR /&gt;return f.UNITID&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To capture the UNITID from the "end" manhole, I created the following attribute rule for the UNITID2 field in the Sewer Mains attribute table:&lt;/P&gt;&lt;P&gt;var manhole = FeatureSetByName($datastore, 'Exported_Manholes', ['*'], true)&lt;BR /&gt;var end_point = Geometry($feature).paths[-1][-1]&lt;BR /&gt;var intersectLayer = Intersects(manhole, end_point)&lt;/P&gt;&lt;P&gt;for (var f in intersectLayer){&lt;BR /&gt;return f.UNITID&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I'm curious what others think of this/how they would do it. I guess if it works, it works though...&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 18:12:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1315650#M71770</guid>
      <dc:creator>Chris_S</dc:creator>
      <dc:date>2023-08-04T18:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Identify point ID at start of line using attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1316239#M71841</link>
      <description>&lt;P&gt;The previous reply worked but would not return &amp;lt;null&amp;gt; if the line segment end point was moved off the point. The following fixes that issue:&lt;/P&gt;&lt;P&gt;var manhole = FeatureSetByName($datastore, 'Exported_Manholes', ['*'], true)&lt;BR /&gt;var start_point = Geometry($feature).paths[0][0]&lt;BR /&gt;var intersectLayer = Intersects(manhole, start_point)&lt;BR /&gt;var startID = First(intersectLayer)&lt;/P&gt;&lt;P&gt;if (startID == null){&lt;BR /&gt;return null&lt;BR /&gt;}&lt;BR /&gt;return startID.UNITID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 22:28:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1316239#M71841</guid>
      <dc:creator>Chris_S</dc:creator>
      <dc:date>2023-08-07T22:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Identify point ID at start of line using attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1544939#M88803</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/706634"&gt;@Chris_S&lt;/a&gt;&amp;nbsp;you are the MVP! Thank you for sharing. This information here was exactly what I was looking for. I learned something new about Arcade's potential.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 19:55:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/identify-point-id-at-start-of-line-using-attribute/m-p/1544939#M88803</guid>
      <dc:creator>NourSalamJMT</dc:creator>
      <dc:date>2024-10-02T19:55:56Z</dc:date>
    </item>
  </channel>
</rss>

