<?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 expression error - sequential number generator in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500473#M9011</link>
    <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354905"&gt;@ChrisDunn1&lt;/a&gt;. I did take the entire feature set offline, but it is not autogenerating the number.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 17:45:15 GMT</pubDate>
    <dc:creator>dsinha</dc:creator>
    <dc:date>2024-07-02T17:45:15Z</dc:date>
    <item>
      <title>Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498415#M8949</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use the expression mentioned on this &lt;A href="https://support.esri.com/en-us/knowledge-base/how-to-automatically-populate-sequential-numbering-for--000031315" target="_blank" rel="noopener"&gt;page&lt;/A&gt;&amp;nbsp;to generate the next number in a field that stores the record number of observations collected in the field. The field &lt;STRONG&gt;idlong &lt;/STRONG&gt;is an integer field and is located in the hosted feature layer&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;DataCollectionInspection&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here is my version of the arcade expression:&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;numberlist&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"DataCollectionInspection"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;topnum&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Top&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OrderBy&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;numberlist&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'&amp;lt;idlong DESC'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;counter&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Number&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;topnum&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'idlong'&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;counter&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;id&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I run it in the Arcade Editor, I get the following error message:&amp;nbsp;&lt;STRONG&gt;Test execution error: Unknown Error. Verify test data.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Would anyone know what I am doing wrong?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Deb.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jun 2024 16:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498415#M8949</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-06-27T16:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498424#M8950</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/786600"&gt;@dsinha&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;It loos like you just have a typo on the second line.&lt;/P&gt;&lt;P&gt;Right now your expression says '&amp;lt;idlong DESC', but it should just be 'idlong DESC'. The opening bracket looks like it was copied from the example but wasn't deleted.&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 17:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498424#M8950</guid>
      <dc:creator>ChrisDunn1</dc:creator>
      <dc:date>2024-06-27T17:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498430#M8951</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I noticed a typo in this line of code:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;topnum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Top&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OrderBy&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;numberlist&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'&amp;lt;idlong DESC'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It should be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var&amp;nbsp;topnum&amp;nbsp;=&amp;nbsp;Top(OrderBy(numberlist,'idlong DESC'),1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I hope this works.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 16:47:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498430#M8951</guid>
      <dc:creator>HawjinF</dc:creator>
      <dc:date>2024-06-27T16:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498446#M8952</link>
      <description>&lt;P&gt;Thank you so much! Completely missed that bracket&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 17:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1498446#M8952</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-06-27T17:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500420#M9009</link>
      <description>&lt;P&gt;I have a follow-up question: Does this Arcade expression (and Arcade expressions in general) work in the offline mode?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 16:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500420#M9009</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-07-02T16:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500429#M9010</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/786600"&gt;@dsinha&lt;/a&gt;&amp;nbsp;- in general most Arcade expressions will work offline, but there are a few exceptions. Anything that sends a request to the server will not work, so something like featureSetByPortalItem would not work. In this case, I &lt;EM&gt;believe&amp;nbsp;&lt;/EM&gt;calling the feature set by name within the map will work, however it will only query features that are within the offline area. If you are not taking the entire feature set offline with your offline area then the results from this query may not be accurate.&lt;/P&gt;&lt;P&gt;It is also worth noting that if you have multiple people working with offline areas they would end up creating duplicate unique identifiers which would likely cause some data problems down the line, depending on your workflow.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 16:49:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500429#M9010</guid>
      <dc:creator>ChrisDunn1</dc:creator>
      <dc:date>2024-07-02T16:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500473#M9011</link>
      <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354905"&gt;@ChrisDunn1&lt;/a&gt;. I did take the entire feature set offline, but it is not autogenerating the number.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 17:45:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500473#M9011</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-07-02T17:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500476#M9012</link>
      <description>&lt;P&gt;I may have been mistaken - it might be that all FeatureSet functions do not work offline, however $layer might work to access the IDs instead of FeatureSetByName, that would be worth trying.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 17:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500476#M9012</guid>
      <dc:creator>ChrisDunn1</dc:creator>
      <dc:date>2024-07-02T17:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500491#M9013</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354905"&gt;@ChrisDunn1&lt;/a&gt;,&amp;nbsp;I am not well-versed in Arcade. Could you suggest how the expression would read with $layer instead of&amp;nbsp;&lt;SPAN&gt;FeatureSetByName? I am assuming its just the first line. Thanks for your help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 18:18:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1500491#M9013</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-07-02T18:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1501194#M9017</link>
      <description>&lt;P&gt;Sure thing - I think you could do it two ways:&lt;/P&gt;&lt;P&gt;var numberlist = $layer&lt;/P&gt;&lt;P&gt;If you use that for the first line instead of the feature set expression, the rest of the code should work the same.&lt;/P&gt;&lt;P&gt;I believe you could remove the first line and instead go right to:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;topnum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Top&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OrderBy&lt;/SPAN&gt;&lt;SPAN&gt;($layer&lt;/SPAN&gt;&lt;SPAN&gt;,'&lt;/SPAN&gt;&lt;SPAN&gt;idlong DESC'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I haven't tested that though.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 18:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1501194#M9017</guid>
      <dc:creator>ChrisDunn1</dc:creator>
      <dc:date>2024-07-03T18:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1501256#M9018</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354905"&gt;@ChrisDunn1&lt;/a&gt;! I will try out these two versions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 18:57:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1501256#M9018</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-07-03T18:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression error - sequential number generator</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1503580#M9049</link>
      <description>&lt;P&gt;Just wanted to report back that the first solution (using &lt;EM&gt;var numberlist = $layer$layer&lt;/EM&gt;) worked!&lt;/P&gt;&lt;P&gt;Thanks again for all your help!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 14:23:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-expression-error-sequential-number/m-p/1503580#M9049</guid>
      <dc:creator>dsinha</dc:creator>
      <dc:date>2024-07-10T14:23:08Z</dc:date>
    </item>
  </channel>
</rss>

