<?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 Auto Create a Repeat Record in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1433187#M56804</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Seeking ideas/direction on how to implement the following:&lt;/P&gt;&lt;P&gt;We have a survey with nested repeats.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use the INBOX to load the survey and the user can make edits to the related 1st repeat.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If any edits are done, we would like to automatically create one 2nd repeat record to guide the user to indicate / record&amp;nbsp;what change was implemented (read edit log).&amp;nbsp; Don't need to automatically define what exactly was changed.&amp;nbsp; Instead just want to create the 2nd repeat record to allow the user to update what they have changed manually.&lt;/P&gt;&lt;P&gt;Currently this is all working except the user must manually create an edit log record (2nd repeat).&amp;nbsp; I would like to force this 2nd repeat record to at least be created automatically, knowing that the user can still delete it if they must.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your input is most appreciated.&lt;/P&gt;&lt;P&gt;Cheers, BKS&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 17:56:23 GMT</pubDate>
    <dc:creator>BKS</dc:creator>
    <dc:date>2024-05-10T17:56:23Z</dc:date>
    <item>
      <title>Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1433187#M56804</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Seeking ideas/direction on how to implement the following:&lt;/P&gt;&lt;P&gt;We have a survey with nested repeats.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use the INBOX to load the survey and the user can make edits to the related 1st repeat.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If any edits are done, we would like to automatically create one 2nd repeat record to guide the user to indicate / record&amp;nbsp;what change was implemented (read edit log).&amp;nbsp; Don't need to automatically define what exactly was changed.&amp;nbsp; Instead just want to create the 2nd repeat record to allow the user to update what they have changed manually.&lt;/P&gt;&lt;P&gt;Currently this is all working except the user must manually create an edit log record (2nd repeat).&amp;nbsp; I would like to force this 2nd repeat record to at least be created automatically, knowing that the user can still delete it if they must.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your input is most appreciated.&lt;/P&gt;&lt;P&gt;Cheers, BKS&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 17:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1433187#M56804</guid>
      <dc:creator>BKS</dc:creator>
      <dc:date>2024-05-10T17:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1433350#M56805</link>
      <description>&lt;P&gt;Sounds kind of tricky. I don't know if this would work, but perhaps your survey could use the &lt;STRONG&gt;repeat count&lt;/STRONG&gt; feature to manually define the number of repeats. You could use the &lt;STRONG&gt;once&lt;/STRONG&gt; function to grab the initial value of the repeat count field, then increment it by 1, put that value in.&lt;/P&gt;&lt;P&gt;I would guess the form will complain about circular dependencies, though. But it's worth trying, I think!&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 18:22:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1433350#M56805</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-05-10T18:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1449856#M56811</link>
      <description>&lt;P&gt;Thanks for that idea&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Exactly when does the new repeat record in the 2nd nested repeat (i.e. the Edit Log) get created, when I&lt;SPAN&gt;&amp;nbsp;increment the repeat count by 1?&amp;nbsp; By doing so you think a new repeat record would be created?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Ideally I'd like to create the Edit Log row when any RW value has been changed by the user in the form, BUT as a perhaps simpler alternative, is there a way to create this record as soon as I open the form if I'm doing so to Edit it ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just searching for a reasonable solution; doesn't have to be perfect.&amp;nbsp; However, it would be nice to have something&amp;nbsp;better than&amp;nbsp;&lt;STRONG&gt;relying on the user to add a repeat record and record the change they made&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Your assistance is appreciated.&lt;/P&gt;&lt;P&gt;BKS&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2024 15:33:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1449856#M56811</guid>
      <dc:creator>BKS</dc:creator>
      <dc:date>2024-05-12T15:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458358#M56820</link>
      <description>&lt;P&gt;Funny thing is, this actually works without a circular reference! So, this workflow should be fine:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_0-1715612599903.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/103933iF7B7019CF2BFBFE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_0-1715612599903.png" alt="abureaux_0-1715612599903.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_1-1715612606870.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/103934iB19CDE916AC3EAAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_1-1715612606870.png" alt="abureaux_1-1715612606870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:03:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458358#M56820</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-05-13T15:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458375#M56822</link>
      <description>&lt;P&gt;Ah, excellent! It's been a while since I attempted something similar, and I'd been going about it the wrong way. Thanks for actually testing it out!&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:06:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458375#M56822</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-05-13T15:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458377#M56823</link>
      <description>&lt;P&gt;Oh ya. I'll point out the obvious though. This will:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Always leave you with an empty repeat&lt;/LI&gt;&lt;LI&gt;You cannot have required fields in your repeat since the user would need to fill them out which would create a new repeat (and &lt;EM&gt;that&lt;/EM&gt; would be your circular reference).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So long as you are okay with not having required fields and that empty repeat, this actually works a lot better than I would have expected.&lt;/P&gt;&lt;P&gt;If you add a conditional statement to the formula to swap between "count(${test_rpt})+1" and "count(${test_rpt})+0", then you'd be fine to ignore the above.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458377#M56823</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-05-13T15:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458645#M56824</link>
      <description>&lt;P&gt;Because this worked better than I would have expected, it got me thinking of the limitations I mentioned. I put together this alternative quickly that circumvents most of those limitations.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_0-1715613717130.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/103937iC7F3D3339CB8C5BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_0-1715613717130.png" alt="abureaux_0-1715613717130.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Basically, that ${test_counter} field is the trigger. Just decide what you want a "complete" record to look like and set the logic up according to that. That means you can have required fields!&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1458645#M56824</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-05-13T15:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1468267#M56868</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/454586"&gt;@abureaux&lt;/a&gt;&amp;nbsp;and thanks for all your help !&lt;/P&gt;&lt;P&gt;I tried to get either, and even a combination, of your solutions to work for me but I kept getting strange results.&amp;nbsp;&amp;nbsp;I almost gave up and then I tried this solution:&lt;/P&gt;&lt;P&gt;1) Added&amp;nbsp;once(count(${test_rpt})+1) to the repeat_count column of begin repeat record&lt;/P&gt;&lt;P&gt;2) Added allowAdds=true allowUpdates=false query to the bind::esri:parameters column of begin repeat record&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This solution produced the following:&lt;/P&gt;&lt;P&gt;1) After loading the survey from the INBOX,&amp;nbsp;1 additional repeat record (editable since allowAdds=true), was added.&lt;/P&gt;&lt;P&gt;2) It also loads any previous repeat records (read-only since allowUpdates=false query)&lt;/P&gt;&lt;P&gt;3) If I try to save the survey it notifies that I have a required field in the editable repeat record; which is correct.&lt;/P&gt;&lt;P&gt;4) After populating this one and only required field in the repeat, I am able to submit the survey&lt;/P&gt;&lt;P&gt;This creates no blank repeat recs and also allows me to have required fields in the repeat.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I've tested this but not exhaustively.&amp;nbsp; I wonder if there is something you would expect to find given this solution (that perhaps I have not yet found)?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing I noticed that is odd (and I cannot explain) is that IF the parent record has zero associated repeat recs, it automatically creates 2 repeat records the first time.&amp;nbsp; BUT after at least one repeat records exists for a given parent record, it only creates 1 additional repeat record when opening.&lt;/P&gt;&lt;P&gt;The other smallish thing is that the repeat that is displayed when the survey is opened is the first repeat created, followed by the next and so on.&amp;nbsp; To get to the repeat that the user needs to update, they have to click through as many repeat recs as exist.&amp;nbsp; &amp;nbsp;I realize they can long click on the right arrow to go to the end of the repeat collection, but this is not obvious.&amp;nbsp; I'm hoping that there might be a way to use position(..) and/or index to have the survey open to the&amp;nbsp;&lt;STRONG&gt;last&lt;/STRONG&gt; (most recent) repeat record.&lt;/P&gt;&lt;P&gt;Finally one other small thing that I do not understand, is that the user is NOT able to delete the newly created repeat record even though the allowAdds=true.&amp;nbsp; This I'm quite happy about but wasn't expecting it.&lt;/P&gt;&lt;P&gt;Thanks again and I look forward to any further input / advice you might have.&lt;/P&gt;&lt;P&gt;Cheers, BKS&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 21:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1468267#M56868</guid>
      <dc:creator>BKS</dc:creator>
      <dc:date>2024-05-14T21:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1472891#M56884</link>
      <description>&lt;P&gt;Sounds like you have a good solution there! If you have no more questions, don't forget to mark your response as the accepted solution so others can benefit.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;"...IF the parent record has zero associated repeat recs, it automatically creates 2 repeat records the first time..."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Sounds like you need to beef up your calculate a little. On that note, two things:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the repeat_count column doesn't always like doing math. A simple solution is to put your calculate in to a &lt;EM&gt;calculate&lt;/EM&gt; field, and then reference that calculate in the repeat_count column. This can help resolve lots of little unforeseen issues.&lt;/LI&gt;&lt;LI&gt;Building on what I have above, use an IF() statement in a separate calculate. Something like this should work:&lt;BR /&gt;&lt;STRONG&gt;if(count(${test_rpt})=0,1,once(count(${test_rpt})+1))&lt;BR /&gt;&lt;/STRONG&gt;I had a similar issue with my second attempt and ended up with the blow, which is effectively the same thing:&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_0-1715782238110.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104175i09B4F76DEF4923E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_0-1715782238110.png" alt="abureaux_0-1715782238110.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;"I'm hoping that there might be a way to use position(..) and/or index to have the survey open to the&amp;nbsp;&lt;STRONG&gt;last&lt;/STRONG&gt; (most recent) repeat record."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;This is a common ask. Unfortunately, the answer is "cannot be done" (at least presently).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;"...the user is NOT able to delete the newly created repeat record..."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;This is expected behaviour. As soon as you use the repeat_count column, the option to add or delete records goes away.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 14:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1472891#M56884</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-05-15T14:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Create a Repeat Record</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1472998#M56893</link>
      <description>&lt;P&gt;Thanks again to you both&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/454586"&gt;@abureaux&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I will try the remaining suggestion to avoid the 2 repeat recs being created if zero exist the first time and get back.&amp;nbsp; RE: other two points, thanks for the confirmation info.&lt;/P&gt;&lt;P&gt;Your help is most appreciated.&lt;/P&gt;&lt;P&gt;BKS&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 16:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-create-a-repeat-record/m-p/1472998#M56893</guid>
      <dc:creator>BKS</dc:creator>
      <dc:date>2024-05-15T16:13:47Z</dc:date>
    </item>
  </channel>
</rss>

