<?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: Is sequential numbering based on last known number possible with Arcade in a &amp;quot;new&amp;quot; web map form? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1283512#M51772</link>
    <description>&lt;P&gt;This seems to work in New map viewer and in Field Maps if I set up calculation on the field in the Form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var vals = FeatureSetByName($datastore,"Sign",['TestInt'],false)
var numarray = []
for (var n in vals){
    var nn = Number(n.TestInt)
    Push(numarray, nn)
}
var maxnum = Max(numarray)
var newnum = maxnum + 1

return newnum&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on how many records, it takes a bit to respond.&amp;nbsp; Could be a 'faster' way, but I'm not familiar enough with Arcade to figure out how to speed it up.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2023 18:05:18 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2023-04-27T18:05:18Z</dc:date>
    <item>
      <title>Is sequential numbering based on last known number possible with Arcade in a "new" web map form?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1283361#M51765</link>
      <description>&lt;P&gt;I have &lt;A href="https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-expressions-calculate-max-value/td-p/169963" target="_blank"&gt;Solved: Attribute Rule Expressions: calculate max value fr... - Esri Community&lt;/A&gt;&amp;nbsp;successfully working in the fgdb environment. What I'm looking to do is replicate in a "new" web map viewer "Form" to autopopulate an unique ID field that IS NOT the objectID nor the GlobalID. Thing is, the data contains many existing records, with this ID ranging from 1-15000, with many values in between missing due to past deletions. What I want is to look at the max value in this field, and have (Arcade?) auto populate the next highest value when the user creates a new point, based on this form. But I don't see how this is possible as AGOL (&lt;STRONG&gt;still&lt;/STRONG&gt;!) does not support GDB attribute rules and&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-sequence.htm" target="_blank"&gt;Create Database Sequence (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 14:48:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1283361#M51765</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2023-04-27T14:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is sequential numbering based on last known number possible with Arcade in a "new" web map form?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1283512#M51772</link>
      <description>&lt;P&gt;This seems to work in New map viewer and in Field Maps if I set up calculation on the field in the Form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var vals = FeatureSetByName($datastore,"Sign",['TestInt'],false)
var numarray = []
for (var n in vals){
    var nn = Number(n.TestInt)
    Push(numarray, nn)
}
var maxnum = Max(numarray)
var newnum = maxnum + 1

return newnum&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on how many records, it takes a bit to respond.&amp;nbsp; Could be a 'faster' way, but I'm not familiar enough with Arcade to figure out how to speed it up.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 18:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1283512#M51772</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-04-27T18:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is sequential numbering based on last known number possible with Arcade in a "new" web map form?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1290795#M52311</link>
      <description>&lt;P&gt;And for future folks with this question, this is what worked for my case with actual FC and field name, performance is fine with 2k records.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var vals = FeatureSetByName($datastore,"COR_HYDROPOWER_PROJECT_POINTS",['HYDRO_PROJECT_ID'],false)
var numarray = []
for (var n in vals){
    var nn = Number(n.HYDRO_PROJECT_ID)
    Push(numarray, nn)
}
var maxnum = Max(numarray)
var newnum = maxnum + 1

return newnum&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 May 2023 19:13:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/is-sequential-numbering-based-on-last-known-number/m-p/1290795#M52311</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2023-05-18T19:13:37Z</dc:date>
    </item>
  </channel>
</rss>

