<?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: Have a repeat in survey123 default to last record entered in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1018841#M32053</link>
    <description>&lt;P&gt;Are you trying to do something like a Same as last button?&amp;nbsp; If so then no can't do it if the size of the value varies.&amp;nbsp; I created a page with a default values setup then it asks you Use Defaults?&amp;nbsp; Best I could do.&amp;nbsp; I posted on this but cannot find it in the new system.&lt;/P&gt;&lt;P&gt;I have been asking for the lists to auto sort based on the last choice for some time now.&amp;nbsp; A lot of this was talks with the 123 team or in the early adopter so I cannot link to them but this is one from 2018&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/how-to-random-sort-choices-in-a-question/td-p/796157" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-questions/how-to-random-sort-choices-in-a-question/td-p/796157&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I see you say LPI in there.&amp;nbsp; I have a LPI form already as part of our program for a Fed agency.&amp;nbsp; Are you Fed by chance or work with one?&amp;nbsp; If so DM me and I can get you more info.&lt;/P&gt;&lt;P&gt;Also move your list to external choices and it will be much faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit just seeing some of this is coming in the new beta.&amp;nbsp; I will be testing this soon.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2021 23:05:11 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2021-01-21T23:05:11Z</dc:date>
    <item>
      <title>Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1018715#M32040</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am creating a form in survey123 that records plant species along different transects. It would speed up productivity a lot if the survey could default to the last species selected. Has anyone set up a survey like this before? I am trying to capture the last species collect in a text field outside the repeat, but I am getting the error below. I am attaching the survey below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TomBaldvins_0-1611246410876.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4246i9C192C1D2368A8AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TomBaldvins_0-1611246410876.png" alt="TomBaldvins_0-1611246410876.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 16:28:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1018715#M32040</guid>
      <dc:creator>TomBaldvins</dc:creator>
      <dc:date>2021-01-21T16:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1018841#M32053</link>
      <description>&lt;P&gt;Are you trying to do something like a Same as last button?&amp;nbsp; If so then no can't do it if the size of the value varies.&amp;nbsp; I created a page with a default values setup then it asks you Use Defaults?&amp;nbsp; Best I could do.&amp;nbsp; I posted on this but cannot find it in the new system.&lt;/P&gt;&lt;P&gt;I have been asking for the lists to auto sort based on the last choice for some time now.&amp;nbsp; A lot of this was talks with the 123 team or in the early adopter so I cannot link to them but this is one from 2018&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/how-to-random-sort-choices-in-a-question/td-p/796157" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-questions/how-to-random-sort-choices-in-a-question/td-p/796157&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I see you say LPI in there.&amp;nbsp; I have a LPI form already as part of our program for a Fed agency.&amp;nbsp; Are you Fed by chance or work with one?&amp;nbsp; If so DM me and I can get you more info.&lt;/P&gt;&lt;P&gt;Also move your list to external choices and it will be much faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit just seeing some of this is coming in the new beta.&amp;nbsp; I will be testing this soon.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 23:05:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1018841#M32053</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-01-21T23:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1025590#M32405</link>
      <description>&lt;P&gt;Hello Doug,&lt;/P&gt;&lt;P&gt;Thank you for your response. I am currently working for a Natural Heritage Program, and work with several federal agencies. This LPI form is based on one we developed for some BLM aim studies. We are now trying to adapt it for forestry surveys.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 21:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1025590#M32405</guid>
      <dc:creator>TomBaldvins</dc:creator>
      <dc:date>2021-02-10T21:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1025595#M32406</link>
      <description>&lt;P&gt;I am with the AIM team!&amp;nbsp; Send me a DM and I will just give you the form.&amp;nbsp; No need to reinvent it.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 21:19:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1025595#M32406</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-02-10T21:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1098288#M37175</link>
      <description>&lt;P&gt;Hey Doug,&lt;/P&gt;&lt;P&gt;Any advice on setting this up if the size of the value doesn't vary?&lt;/P&gt;&lt;P&gt;I tried using indexed-repeat(${same_field},${same_repeat},position(..)-1) and the same thing referencing a 'count(${repeat})-1' calc field outside the repeat instead of position(..). No luck in either case, unfortunately.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Emil&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 00:21:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1098288#M37175</guid>
      <dc:creator>emilperlt_rrc</dc:creator>
      <dc:date>2021-09-15T00:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1098395#M37186</link>
      <description>&lt;P&gt;Not sure what you mean about size does not vary?&lt;/P&gt;&lt;P&gt;indexed repeat will not work when trying to bring it into the next repeat to a field with the same name.&amp;nbsp; It can only show it in a different field.&amp;nbsp; This more or less makes the function useless for most uses.&lt;/P&gt;&lt;P&gt;The only way I have ever got same as last to go into the same field is using javascript - but my repeat is too big (at 60 fields) and blows up with a memory issue.&lt;/P&gt;&lt;P&gt;Is that what you meant?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 13:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1098395#M37186</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-09-15T13:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1098413#M37188</link>
      <description>&lt;P&gt;That's exactly what I meant. Thank you for the clarification!&lt;/P&gt;&lt;P&gt;My repeat is rather long too so I'll avoid javascript for the same reason. I'll just go with a default value page for now as you suggested above.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 13:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1098413#M37188</guid>
      <dc:creator>emilperlt_rrc</dc:creator>
      <dc:date>2021-09-15T13:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1136883#M39969</link>
      <description>&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;I have a small repeat that I am trying to do this with, would you be able to share the javascript for pulling the value for the same attribute name from the previous position in the repeat?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 15:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1136883#M39969</guid>
      <dc:creator>LarryWiebe</dc:creator>
      <dc:date>2022-01-25T15:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1136893#M39973</link>
      <description>&lt;P&gt;It is actually working in the new 3.14 with the new fast calc engine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;call in the field
pulldata("@javascript", "functions.js", "sameaslast", ${LPIDetail}, number(${RecCount}), "TopCanopy")

actaul function

function sameaslast(repeat, position, fieldname) {
	if (position &amp;gt; 1){
		return repeat[position - 2][fieldname];

	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note take the comments out&lt;/P&gt;&lt;P&gt;Oh Also note you can use position({repeatname}) instead of reccount now!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 15:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1136893#M39973</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-01-25T15:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1158248#M41648</link>
      <description>&lt;P&gt;Hello Doug,&lt;/P&gt;&lt;P&gt;Can this code be modified to not use with repeats?&amp;nbsp; I want the previous value for field in the main survey instead of a repeat.&lt;/P&gt;&lt;P&gt;Also how do you make a default value page?&amp;nbsp; Just add another page that has defaults values for each question?&lt;/P&gt;&lt;P&gt;I work for the US Fish and Wildlife service, I am creating a survey to record daily fish feeding at a National Fish Hatchery.&amp;nbsp; The feed type and size only changes every 1 or 2 weeks,&amp;nbsp; they don't want to enter the type and size for each pond but they will need to change it when appropriate.&amp;nbsp; If I can get the survey to repeat the last value entered for those two questions, this should solve the problem.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 04:47:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1158248#M41648</guid>
      <dc:creator>DavidHines</dc:creator>
      <dc:date>2022-03-28T04:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1158374#M41665</link>
      <description>&lt;P&gt;So you want to lookup into older forms?&amp;nbsp; That can be done with pulldata to the service but you would have to be online.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Offline you could just open the last form and make a copy, or you could launch from Field Maps and it send the last values to 123 via URL.&amp;nbsp; Field Maps could have the value in a field from script each night or use Arcade and FeatureSet to lookup and get the last value.&amp;nbsp; Or based on what you posted you may want to make set values in Field Maps so it tells them what value to feed.&lt;/P&gt;&lt;P&gt;I guess I need more info.&lt;/P&gt;&lt;P&gt;For the defaults page its simple - just a if to use or do not use.&lt;/P&gt;&lt;P&gt;if(${UseDefaults}='Yes',${CollectionNumberTopDefault},'')&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LPI Defaults.gif" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/37469i1CFC69662B8B9A4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LPI Defaults.gif" alt="LPI Defaults.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Hope that helps.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 14:30:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1158374#M41665</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-03-28T14:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245684#M46808</link>
      <description>&lt;P&gt;Can you explain to me like I'm 5 years old how to setup the javascript file?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &amp;nbsp;I've never created a javascript file, but this looks like the solution I need.&amp;nbsp; I want to pull the 18 answers from the previous repeat into each subsequent repeat.&amp;nbsp; I know the .js file needs to be stored in a "scripts" folder in the survey directory.&lt;/P&gt;&lt;P&gt;Go Pack Go!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 17:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245684#M46808</guid>
      <dc:creator>LukeGilner1</dc:creator>
      <dc:date>2023-01-05T17:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245695#M46810</link>
      <description>&lt;P&gt;Oh its been years now but check out this post&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That is a lot to pull though and it may be slow calling javascript 18 times.&amp;nbsp; Seems weird to need that many so I would be curious the use case on that.&amp;nbsp; Using arcade after that fact may be easier.&lt;/P&gt;&lt;P&gt;We got this on Sunday night!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 17:33:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245695#M46810</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-01-05T17:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245730#M46811</link>
      <description>&lt;P&gt;Thanks Doug!&amp;nbsp; I'll take a look through this.&amp;nbsp; I'd have to upgrade Survey123 to see the new Script tab first and then rebuild all my excel forms.&amp;nbsp; I'd like to pull 18 answers because each repeat (inspection) has a series of questions with Acceptable, Needs Improvement, Corrected-Acceptable as choices.&amp;nbsp; It'd be nice if the user could see that the previous inspection was set to Needs Improvement on a certain question to help them remember that the item needs to be corrected on the ground and then changed to Corrected-Acceptable in the new inspection, if appropriate.&amp;nbsp; Is there a better way to do this with Arcade?&lt;/P&gt;&lt;P&gt;I think the game will be a nail bitter.&amp;nbsp; But I hope they blow them out!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 18:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245730#M46811</guid>
      <dc:creator>LukeGilner1</dc:creator>
      <dc:date>2023-01-05T18:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245765#M46817</link>
      <description>&lt;P&gt;Well you could pull the last inspection data via arcade in Field Maps then pass that to 123.&amp;nbsp; We use field maps to find out way there.&amp;nbsp; 18 is still a lot but I have done up to like 12 I think.&amp;nbsp; You could also use Arcade to only pass say a list of items that did not pass the last time.&amp;nbsp; That would be less for the person to review and less space on the form.&amp;nbsp; Like a what to watch out for note basically.&amp;nbsp; Could work out nice.&amp;nbsp; This assumes 1 form per inspection vs a main and then each inspection is a repeat.&amp;nbsp; I like to have one form per inspection so I get all the editor tracking, GPS, etc.&amp;nbsp; You could also display it in Field Maps before they click but not as slick.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that is what you mean.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 19:22:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1245765#M46817</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-01-05T19:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Have a repeat in survey123 default to last record entered</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1246947#M46871</link>
      <description>&lt;P&gt;I came up with a roundabout way to achieve this.&amp;nbsp; I added a hidden "score" to each question within the repeat.&amp;nbsp; Acceptable = 0, Needs Improvement = -1, Corrected-Acceptable = 5.&amp;nbsp; Then outside the repeat I summed each "score" for each question.&amp;nbsp; Inside the repeat I also added a Note with red font for each question that basically flags this question was determined to Need Improvement.&amp;nbsp; The Note is only relevant if the sum of the "score" is Less than 0, so it kind of tells you what the previous response was.&amp;nbsp; There may be times that subsequent repeats will remain as Needs Improvement for several inspections in a row, so that is why the Corrected-Acceptable = 5, to make sure the sum will eventually be 0 or greater so that the Note no longer is relevant.&amp;nbsp; Just thought I'd share.&amp;nbsp; Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 18:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/have-a-repeat-in-survey123-default-to-last-record/m-p/1246947#M46871</guid>
      <dc:creator>LukeGilner1</dc:creator>
      <dc:date>2023-01-10T18:56:31Z</dc:date>
    </item>
  </channel>
</rss>

