<?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: Map Viewer Web Form - incremental number updates when the feature is moved in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1539296#M61519</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15530"&gt;@RhettZufelt&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2024 07:44:50 GMT</pubDate>
    <dc:creator>PanGIS</dc:creator>
    <dc:date>2024-09-17T07:44:50Z</dc:date>
    <item>
      <title>Map Viewer Web Form - incremental number updates when the feature is moved</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1527007#M61104</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a web form that calculates an incremental ID and then concatenates it to form a refNumber.&lt;/P&gt;&lt;P&gt;It works fine until you decide to update the point: let's say the position is incorrect and you need to move it.&lt;/P&gt;&lt;P&gt;this is the code and below are the results: the number should stay the same as it is the same point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Get the current feature's newID field value
var currentID = $feature.newID;

// Check if currentID is null or empty, meaning this feature needs a new ID
if (IsEmpty(currentID)) {
// Get the maximum value of the newID field from all features in layerName
var maxID = Max(FeatureSetByName($datastore, "layerName", ["newID"]), "newID");
return maxID + 1;
} else {
// If currentID is already set, return the existing currentID
return currentID;
}&lt;/LI-CODE&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;create a point with ID 5 and then moved it becomes 6&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PanGIS_0-1724667431043.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113453iF51C7D574FC21153/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PanGIS_0-1724667431043.png" alt="PanGIS_0-1724667431043.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 10:16:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1527007#M61104</guid>
      <dc:creator>PanGIS</dc:creator>
      <dc:date>2024-08-26T10:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Web Form - incremental number updates when the feature is moved</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1527209#M61111</link>
      <description>&lt;P&gt;Think you just need to check the $editcontext.editType.&amp;nbsp; If "INSERT", calculate ID, if "UPDATE", just move point without calculating.&lt;/P&gt;&lt;P&gt;Basically the same as &lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325506/highlight/true#M6940" target="_self"&gt;this post&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 15:17:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1527209#M61111</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-08-26T15:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Web Form - incremental number updates when the feature is moved</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1539296#M61519</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15530"&gt;@RhettZufelt&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 07:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-web-form-incremental-number-updates/m-p/1539296#M61519</guid>
      <dc:creator>PanGIS</dc:creator>
      <dc:date>2024-09-17T07:44:50Z</dc:date>
    </item>
  </channel>
</rss>

