<?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: Pulling data from the previous repeat in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776031#M4988</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay in response! I just got back to work this week and have been playing catch up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I send you a copy of the .xlsx form?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am loading the existing data via Inbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The workflow I&amp;nbsp;have at the&amp;nbsp;moment is to:&lt;/P&gt;&lt;P&gt;1) open the previous month's repeat&lt;/P&gt;&lt;P&gt;2) copy value of "CurrMonReading" field&lt;/P&gt;&lt;P&gt;3) Create a new repeat.&lt;/P&gt;&lt;P&gt;4) Paste copied value into the "PrevMonReading" field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If I can get the Previous month's reading to autofill into a new repeat, than my users won't have to worry about all this back and forth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2019 00:59:16 GMT</pubDate>
    <dc:creator>AnnaSan1</dc:creator>
    <dc:date>2019-01-31T00:59:16Z</dc:date>
    <item>
      <title>Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776028#M4985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a form I created using an existing hosted layer feature on AGOL. The point layer is of water meter locations with a related table for monthly readings. Currently, my form&amp;nbsp;is set for the field crew to type in the current month's reading, type in the Previous month's reading, and multiple that by a multiplier(a field present in the point layer) to get the value of GallonsUsed for the month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, ideally, I wanted to somehow pull the Previous's month's reading(the value&amp;nbsp;obtained&amp;nbsp;from the previous repeat of that location) into a new repeat to avoid having to look up and type that value in, thus getting rid of the Previous month reading field altogether.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I currently have in my calculation column:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/432157_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Is what I want possible? Or we&amp;nbsp;stuck with&amp;nbsp;manually entering the values when creating a&amp;nbsp;new repeat?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2018 00:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776028#M4985</guid>
      <dc:creator>AnnaSan1</dc:creator>
      <dc:date>2018-12-21T00:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776029#M4986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One option depending on your workflow&amp;nbsp;might be to use Collector in conjunction with Survey123. I havent tried it, but you could try and create a hosted feature service view(doesnt use credits) using the Join Fields analysis in AGOL that grabs the most recent meter reading date and joins that to the meter feature service. You could then use the survey123 URL scheme in a Collector pop up to push the meter serial number, most recent meter reading, and ideally the GlobalID to Survey123?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join Fields settings:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="607" src="https://community.esri.com/legacyfs/online/432218_pastedImage_4.png" width="339" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2018 22:17:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776029#M4986</guid>
      <dc:creator>patricksowers1</dc:creator>
      <dc:date>2018-12-23T22:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776030#M4987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you loading and editing the existing parent record via the Inbox that contains the repeats? If so, at the time of collecting the new repeat record (current month), is the previous months data already loaded in a previous records in the repeat?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you use the max() function outside the repeat questions (in parent) layer to get the max value of the data already collected in current month, and then reference that value via a calculation to populate the previous month value (as it should always be the max value when loaded via Inbox?) when adding a new record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could share your xlsx form I could take a closer look, but am hoping the method described above should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2018 00:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776030#M4987</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-12-24T00:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776031#M4988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay in response! I just got back to work this week and have been playing catch up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I send you a copy of the .xlsx form?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am loading the existing data via Inbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The workflow I&amp;nbsp;have at the&amp;nbsp;moment is to:&lt;/P&gt;&lt;P&gt;1) open the previous month's repeat&lt;/P&gt;&lt;P&gt;2) copy value of "CurrMonReading" field&lt;/P&gt;&lt;P&gt;3) Create a new repeat.&lt;/P&gt;&lt;P&gt;4) Paste copied value into the "PrevMonReading" field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If I can get the Previous month's reading to autofill into a new repeat, than my users won't have to worry about all this back and forth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 00:59:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776031#M4988</guid>
      <dc:creator>AnnaSan1</dc:creator>
      <dc:date>2019-01-31T00:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776032#M4989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have sent you a private message with my email details so you can send the files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 04:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776032#M4989</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-01-31T04:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776033#M4990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for providing the XLSForm for your survey.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The max() function &lt;A href="https://community.esri.com/migrated-users/283902"&gt;Philip Wilson&lt;/A&gt; mentioned can be used to return the maximum value from a field in a repeat. However, in this case each time a new repeat record is added and the current meter reading entered, the max() function will read in this new value (essentially overwriting the previous maximum value). This then breaks the subsequent GallonsUsed calculation. The way you've designed your survey (i.e. user manually enters the previous reading each time a repeat is added) is currently the best option to ensure the form works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have an open enhancement request to introduce indexed repeat functions (e.g. return value from first repeat, last repeat, repeat x of y, etc.). This would allow you to 'look up' the latest meter reading and use it in another calculation. We will add to this thread&amp;nbsp;any updates on the progress with this enhancement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 03:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776033#M4990</guid>
      <dc:creator>Jim-Moore</dc:creator>
      <dc:date>2019-02-06T03:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776034#M4991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When adding the new record within the repeat; could you use the once() function when pulling the max() function of the repeat in order to retain the calculation that occurs? Something like this below? Maybe you would need to use both entry columns?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(once(max(${lastMeterRead}))) - (${currentMeterRead})&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 12:44:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776034#M4991</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-02-06T12:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776035#M4992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was just working on this today actually.&amp;nbsp; And what Mike listed is what I did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field 1 - outside of repeat gets calc&amp;nbsp;max(0, max(${repeatfield}))&amp;nbsp; the 0 is to handle the very first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field 2 - inside the repeat gets&amp;nbsp;once(${Field1})&amp;nbsp; That way when a new repeat is added it gets the held max value just that once.&amp;nbsp; Then when max() changes no biggie.&amp;nbsp; Once a new max is entered Field 1 changes and then in turn is used on repeat 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In once case I went ahead and filled in the last value for the user.&amp;nbsp; In others I left the field viable so the user can see the value from the last repeat right there.&amp;nbsp; I am still a bit concerned about users going 3 repeats back and "fixing" something.&amp;nbsp; This may then fall apart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 21:27:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/776035#M4992</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2019-03-05T21:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1472817#M56881</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354006"&gt;@Jim-Moore&lt;/a&gt;,&amp;nbsp;I was wondering if there has been any progress with the open enhancement request for indexed repeat functions?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 13:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1472817#M56881</guid>
      <dc:creator>AlexFazzino</dc:creator>
      <dc:date>2024-05-15T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1474288#M56948</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/675251"&gt;@AlexFazzino&lt;/a&gt;&amp;nbsp;two new functions were introduced in Connect 3.12 (2021) for working with repeat indexes: &lt;EM&gt;position(..)&lt;/EM&gt; and &lt;EM&gt;indexed-repeat()&lt;/EM&gt;. Please refer to the following documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformrepeats.htm#ESRI_SECTION1_9F07ECB9F1C341CF8A05AF54B1B011B0" target="_blank" rel="noopener"&gt;Return the index of a repeat record&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformrepeats.htm#ESRI_SECTION1_F3E28755416F4A6CBD7B7D900EB9EFE6" target="_blank" rel="noopener"&gt;Use values from indexed repeats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 02:03:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1474288#M56948</guid>
      <dc:creator>Jim-Moore</dc:creator>
      <dc:date>2024-05-17T02:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1592214#M61543</link>
      <description>&lt;P&gt;Hi Jim, you siad "an enhancement request to introduce indexed repeat functions (e.g., returning the value from the first repeat, last repeat, or a specific repeat x of y)." Do you have any updates on this enhancement request?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 14:46:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1592214#M61543</guid>
      <dc:creator>FaresAl</dc:creator>
      <dc:date>2025-03-05T14:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling data from the previous repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1592583#M61576</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/740571"&gt;@FaresAl&lt;/a&gt;&amp;nbsp;two new functions were introduced in Connect 3.12 (2021) for working with repeat indexes:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;position(..)&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;indexed-repeat()&lt;/EM&gt;. Please refer to the following documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformrepeats.htm#ESRI_SECTION1_9F07ECB9F1C341CF8A05AF54B1B011B0" target="_blank" rel="noopener nofollow noreferrer"&gt;Return the index of a repeat record&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformrepeats.htm#ESRI_SECTION1_F3E28755416F4A6CBD7B7D900EB9EFE6" target="_blank" rel="noopener nofollow noreferrer"&gt;Use values from indexed repeats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 00:01:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulling-data-from-the-previous-repeat/m-p/1592583#M61576</guid>
      <dc:creator>Jim-Moore</dc:creator>
      <dc:date>2025-03-06T00:01:48Z</dc:date>
    </item>
  </channel>
</rss>

