<?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 JavaScript Increment Based off another field in Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-increment-based-off-another-field-in/m-p/1257026#M47425</link>
    <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to coding, and I want to set up a function that will assign a "sitenumber" at an incremental value for each different sourceid. What I would like is for the function to first search for a "sourceid" (which is being populated by pulldata from an attached csv file), then find the maximum sitenumber for that selection of rows with that sourceid and add 1 to the next sitenumber. I believe I should be using the search() and increment functions, but unsure of exactly how.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I have sourceid 1 and 2. I want sitenumber for sourceid 1 to go 1,2,3, etc. and sitenumber for sourceid 2 to go 1,2,3, etc. When new data is put in through the form, sourceid is autopopulated. Lets say to sourceid 2 in this example. I want the function to find the maximum sitenumber for sourceid 2 and add 1 to that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance is greatly appreciated! Thank you!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 15:13:47 GMT</pubDate>
    <dc:creator>DelaneyMccarthy</dc:creator>
    <dc:date>2023-02-10T15:13:47Z</dc:date>
    <item>
      <title>JavaScript Increment Based off another field in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-increment-based-off-another-field-in/m-p/1257026#M47425</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to coding, and I want to set up a function that will assign a "sitenumber" at an incremental value for each different sourceid. What I would like is for the function to first search for a "sourceid" (which is being populated by pulldata from an attached csv file), then find the maximum sitenumber for that selection of rows with that sourceid and add 1 to the next sitenumber. I believe I should be using the search() and increment functions, but unsure of exactly how.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I have sourceid 1 and 2. I want sitenumber for sourceid 1 to go 1,2,3, etc. and sitenumber for sourceid 2 to go 1,2,3, etc. When new data is put in through the form, sourceid is autopopulated. Lets say to sourceid 2 in this example. I want the function to find the maximum sitenumber for sourceid 2 and add 1 to that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance is greatly appreciated! Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 15:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-increment-based-off-another-field-in/m-p/1257026#M47425</guid>
      <dc:creator>DelaneyMccarthy</dc:creator>
      <dc:date>2023-02-10T15:13:47Z</dc:date>
    </item>
  </channel>
</rss>

