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

1915
8
Jump to solution
11-30-2020 11:41 AM
KimberlyMcCallum
New Contributor III

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

8 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
New Contributor III

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
New Contributor III

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
New Contributor II

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
New Contributor III

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
New Contributor II

Thank you

0 Kudos
Katherine_Clark
MVP Regular Contributor

Hi @JodyZhengLiu - I was wondering, does this work for surveys created with Survey123 Connect? And if so, would it work for copying surveys that are just in the "Outbox" folder? (our field crew always work offline and sync when they return to the office).

Thanks in advance!

0 Kudos