Select to view content in your preferred language

Survey123 Connect - Copy Current Values to New Repeat Record

156
5
Wednesday
ChristopherMask
Regular Contributor

I would like to copy values when a new repeat record is created if current values are not null. I have attached the xls. Additionally, below is the repeat I would like to be able to add this function. I have a feeling this is simple, but I can't find any documentation. Thanks in advance if you have time to help!

 

begin group PlotOverview <center>PLOT OVERVIEW</center>
note <font color ="red">(Step 2: This Section is Used When Status Changes & is Independent From Visit Details)</font>
begin repeat PlotStatusHistory Plot Status History
 
text PlotIDHistory <b>PlotID</b>
text InventoryYr_H <b>Inventory Year</b>
text Protocol Protocol
text Location Location
dateTime StatusDate Status Date
text Status Status
text OwnerApproval Owner Approval
text OwnerName Owner Name
text OwnerName2 Owner Name 2
text OwnerNum Owner Number
text OwnerNum2 Owner Number 2
text PlotType Plot Type
text CtyStZip City, State, Zip
decimal Acres Acres
text Section Section
text Township Township
text Range Range
decimal ForestPerc Forest %
text OwnCl OwnCl
text PID Parcel Identifier
text Reason Reason
note <font color="red">(Tap '< or >' below to Change Overview Inventory Year)</font>
end repeat PlotStatusHistory
end group

 

0 Kudos
5 Replies
DougBrowning
MVP Esteemed Contributor

If you mean copy values from the last repeat into the new repeat then no it cannot be done.  Been trying for years.

Only way is with javascript which is a bit advanced.  See my post here  https://community.esri.com/t5/arcgis-survey123-questions/prepopulate-answers-in-a-repeat-with-last-v...

Hope that helps

0 Kudos
ChristopherMask
Regular Contributor

Bummer, thanks Doug

0 Kudos
DougBrowning
MVP Esteemed Contributor

New 123 will have an Excel looking table with a Duplicate option.  So it is in development. 

0 Kudos
Neal-Kittelson
Frequent Contributor

Not simple, this is probably the best discussion on the topic, but the issue is circular references break the form.

https://community.esri.com/t5/arcgis-survey123-questions/prepopulate-answers-in-a-repeat-with-last-v...

Javascript function described by @DougBrowning in the above link is probably the best option.  Also you could potentially use a CSV to prefill the answers upon a new repeat if you have  previous data and an ID number of some sort. 

0 Kudos
Neal-Kittelson
Frequent Contributor

@ChristopherMask 

Take a look at this.  Throw the extracted .xml file in your folder, it should make a new survey.  Appears to work if you publish.  Major downside is you have to edit the xml to update anything.

0 Kudos