<?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 NextSequenceValue and Split Feature in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403835#M1369</link>
    <description>&lt;P&gt;As part of our organization's transition to Pro, I'm finally beginning to write out our Attribute Rules, and I'm running into a weird conundrum with generating unique IDs.&lt;/P&gt;&lt;P&gt;I have a test database sequence created called "PipeTestingID":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_0-1711980558575.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99611iFA4B9672AF3C2F2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_0-1711980558575.png" alt="MErikReedAugusta_0-1711980558575.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I have a simple Attribute Rule that calls that sequence to generate a test ID:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_1-1711980605639.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99612iB68F1080C4C78602/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_1-1711980605639.png" alt="MErikReedAugusta_1-1711980605639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When creating new features, everything works fine.&amp;nbsp; I get my test IDs and all is working exactly as I'd expect:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_2-1711980870803.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99614i03FA63F16622DADE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_2-1711980870803.png" alt="MErikReedAugusta_2-1711980870803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Except when I split the line:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_6-1711981272415.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99623i67A4D9E2904E2AE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_6-1711981272415.png" alt="MErikReedAugusta_6-1711981272415.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We've skipped TestID-2.&amp;nbsp; And if I do a more complex split that generates more child features, every segment except the largest will do this double-ID jump.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ideal intended behavior should be that the longer part (Segment A, in this case) retains its ID.&amp;nbsp; The shorter part (Segment B, in this case) should get a new unique ID and not skip IDs.&amp;nbsp; I could compromise on &lt;EM&gt;&lt;STRONG&gt;both&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;segments&amp;nbsp;being given a new ID, but I'd prefer Segment A retain its ID.&lt;/P&gt;&lt;P&gt;Near as I can tell from some testing at the end of last week, I'm assuming the split operation consists of an Update operation on the geometry of the original feature (which is shortened to Segment A) and an Insert operation for the remaining portion (Segment B).&lt;/P&gt;&lt;P&gt;I tried setting the rule to trigger on Update as well and writing some logic in to avoid overwriting existing IDs, but most either didn't trigger when that logic was included or triggered every time I so much as changed a diameter when the logic was excluded.&amp;nbsp; Unfortunately, I mistakenly didn't save that code, so I can't post it here without going back down the rabbit hole.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems like a fairly straightforward operation and a fairly straightforward requirement.&amp;nbsp; What am I missing?&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 14:25:35 GMT</pubDate>
    <dc:creator>MErikReedAugusta</dc:creator>
    <dc:date>2024-04-01T14:25:35Z</dc:date>
    <item>
      <title>NextSequenceValue and Split Feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403835#M1369</link>
      <description>&lt;P&gt;As part of our organization's transition to Pro, I'm finally beginning to write out our Attribute Rules, and I'm running into a weird conundrum with generating unique IDs.&lt;/P&gt;&lt;P&gt;I have a test database sequence created called "PipeTestingID":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_0-1711980558575.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99611iFA4B9672AF3C2F2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_0-1711980558575.png" alt="MErikReedAugusta_0-1711980558575.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I have a simple Attribute Rule that calls that sequence to generate a test ID:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_1-1711980605639.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99612iB68F1080C4C78602/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_1-1711980605639.png" alt="MErikReedAugusta_1-1711980605639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When creating new features, everything works fine.&amp;nbsp; I get my test IDs and all is working exactly as I'd expect:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_2-1711980870803.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99614i03FA63F16622DADE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_2-1711980870803.png" alt="MErikReedAugusta_2-1711980870803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Except when I split the line:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MErikReedAugusta_6-1711981272415.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99623i67A4D9E2904E2AE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MErikReedAugusta_6-1711981272415.png" alt="MErikReedAugusta_6-1711981272415.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We've skipped TestID-2.&amp;nbsp; And if I do a more complex split that generates more child features, every segment except the largest will do this double-ID jump.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ideal intended behavior should be that the longer part (Segment A, in this case) retains its ID.&amp;nbsp; The shorter part (Segment B, in this case) should get a new unique ID and not skip IDs.&amp;nbsp; I could compromise on &lt;EM&gt;&lt;STRONG&gt;both&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;segments&amp;nbsp;being given a new ID, but I'd prefer Segment A retain its ID.&lt;/P&gt;&lt;P&gt;Near as I can tell from some testing at the end of last week, I'm assuming the split operation consists of an Update operation on the geometry of the original feature (which is shortened to Segment A) and an Insert operation for the remaining portion (Segment B).&lt;/P&gt;&lt;P&gt;I tried setting the rule to trigger on Update as well and writing some logic in to avoid overwriting existing IDs, but most either didn't trigger when that logic was included or triggered every time I so much as changed a diameter when the logic was excluded.&amp;nbsp; Unfortunately, I mistakenly didn't save that code, so I can't post it here without going back down the rabbit hole.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems like a fairly straightforward operation and a fairly straightforward requirement.&amp;nbsp; What am I missing?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 14:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403835#M1369</guid>
      <dc:creator>MErikReedAugusta</dc:creator>
      <dc:date>2024-04-01T14:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: NextSequenceValue and Split Feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403904#M1370</link>
      <description>&lt;P&gt;Edit:&lt;BR /&gt;&lt;BR /&gt;I went back to 2.9.11/ 3.1/3.2 and I'm getting the correct behavior (split only generates one sequence)&lt;/P&gt;&lt;P&gt;Make sure when you test, create a new line feature, then do the split. this will generates a new sequence number for the line, but then the split will use the next value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you discard the edits the sequence is not returned (will be burned)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 21:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403904#M1370</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2024-04-01T21:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: NextSequenceValue and Split Feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403950#M1371</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var ID = $feature.NewID //Change to whichever id field
var CurrentLength = $feature.Shape_Length// Change to length field
var IDField = 'NewID'
if ( IsEmpty( ID ) ){ ID = 1000 }// Specify starting id value

var SQLFilter = IDField + ' = '
var CompareMatchLen = Max( Filter( $featureset , SQLFilter ) , 'Shape_Length' )
if ( CurrentLength &amp;lt;= CompareMatchLen ){ ID = max( $featureset , IDField ) + 1 }
console( ID )
return ID&lt;/LI-CODE&gt;&lt;P&gt;This works in version 10.9.1. for Enterprise and 2.8 for Pro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 17:26:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1403950#M1371</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2024-04-01T17:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: NextSequenceValue and Split Feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1572305#M1656</link>
      <description>&lt;P&gt;I have essentially the same rule (slightly modified) utilizing nextsequencevalue set up for an asset id field on a feature class that has been published to our organization's enterprise portal.&lt;/P&gt;&lt;P&gt;Rule:&lt;/P&gt;&lt;P&gt;if (IsEmpty($feature.PIPE_ID)) {&lt;BR /&gt;return NextSequenceValue("sssewerline_id_sequence");&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return $feature.PIPE_ID;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;When I edit the feature service in Pro 3.4, I am getting the same behavior of the sequence being triggered twice when the line is Split (original/larger line segment pipe keeps the original ID, but the smaller segment is +2 in the sequence). Any thoughts&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 23:46:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/nextsequencevalue-and-split-feature/m-p/1572305#M1656</guid>
      <dc:creator>GregJohnson4</dc:creator>
      <dc:date>2025-01-02T23:46:50Z</dc:date>
    </item>
  </channel>
</rss>

