Select to view content in your preferred language

Method to to copy data from an existing survey record into a new record for updates/edits?

6033
10
Jump to solution
11-30-2020 11:41 AM
KimberlyMcCallum
Regular Contributor

I am looking for a way to create a new Survey123 record that is prepopulated with data from an existing record. Ideally, I would like to have a Dashboard where a user selects an existing record from a list or a map and that initiates a new record with the values from the existing survey copied into all the fields, allowing them to update and add to this data in a new record. Following these two posts (https://community.esri.com/t5/arcgis-survey123-questions/duplicating-survey-editing-records-in-a-web... and https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-editing-records-in...), I was under the impression that I could do this just by using the URL parameters and simply omitting the mode parameter; however, when I try to open a survey without specifying mode=edit OR mode=view (e.g., link below), I get the following error: "Cannot read property 'view' of undefined"

https://survey123.arcgis.com/share/db2d5d3e245d40ce9b53239015a01cfc?globalId=4af34610-79b0-43fc-8bb7...
(if I add mode=edit or mode=view to the URL, it works but those don't meet my needs of copying the data into a new record).

Am I missing something? Or, is there a better approach that I should be taking to accomplish this workflow?

Thanks in advance for any and all feedback.

0 Kudos
1 Solution

Accepted Solutions
JodyZhengLiu
Esri Contributor

Hi @KimberlyMcCallum ,

This is in production already🙂

Thanks,

Jody Zheng Liu

 

View solution in original post

10 Replies
JodyZhengLiu
Esri Contributor

Hi @KimberlyMcCallum ,

We will support a new mode: ?mode=copy&globalId=<existing_record_globalId> in the web form in mid-December update, which will copy the data from an existing record into a new survey. Could you please have a try then?

 

Thanks,

Jody Zheng Liu

KimberlyMcCallum
Regular Contributor

Thanks @JodyZhengLiu for the prompt reply! That is good news for me but can you provide any more detail on when this feature will be released and how I will know when it's out? 

Best, 

Kim

0 Kudos
KimberlyMcCallum
Regular Contributor

I found that the mode=copy parameter has been implemented and works well for me on the Survey123 beta site:

https://survey123beta.arcgis.com/ 

I hope this gets into production soon! 

0 Kudos
JodyZhengLiu
Esri Contributor

Hi @KimberlyMcCallum ,

This is in production already🙂

Thanks,

Jody Zheng Liu

 

srikanthnamburi3
Occasional Contributor

Hello, Is this working now? any example where i can test it out or a detailed document i can refer to. Looking for your response.

0 Kudos
KimberlyMcCallum
Regular Contributor

This is working now! I am using it in my workflows but I guess you will have to setup your own test data to see it in action. Publish a survey, add a feature to it, go copy the global id and copy it using the URL parameters and your data: 

https://survey123.arcgis.com/share/<very-long-unique-survey-id>?mode=copy&globalId=<very-long-global...

Good luck!

0 Kudos
srikanthnamburi3
Occasional Contributor

Thank you

0 Kudos
JeffHyder
Occasional Contributor

I am trying something like this as well but am struggling with getting the data to pass to the new survey. How is it done? Do I put this url some where in the new survey as answers to the questions. I appreciate any and all help. Thank you.

ZachStern
Emerging Contributor

@JodyZhengLiu I'm also unsure how to pass the data along from the original survey to the duplicate while the user is completing the original survey. What is the workflow for this?

 

Thanks!

0 Kudos