I have a Survey123 form with 4 repeat section with means 4 related tables. I tried to update the form with some minor changes (only choices changes) but was faced with the "All your old data will be deleted" message, so I downloaded the data in a FGDB and overwrote the form. How do I get the previously submitted data loaded back into the hosted feature services and related tables?
For forms without related tables I can just cut & paste from the FGDB FC into the hosted feature service, but this does not work for related table data. Any suggestions?
Nope, they are not nested. The original form and the new version of the form work well. I just need to load the data from version 1 of the form that is now in a FGDB into version 2 of the form. Exact same schema, just changes made to domains. Not sure why it wouldn't let me update without deleting data previous data, but that seems to happen sometimes.
Normally it is not a big deal to migrate the data into the new form by editing the feature service in ArcGIS Pro, but I don't see a procedure to copy rows from one table to another unless they are attribute values of tables:
Copying and pasting records in a table—Help | ArcGIS Desktop
Normally the appropriate tool is Append—Data Management toolbox | ArcGIS Desktop , which has an environment setting to preserve GlobalIDs (see Preserve Global IDs (Environment setting)—Geoprocessing | ArcGIS Desktop); however, there is a limitation that may not make it suitable for the workflow involving FGDB.
In it's place, you can workaround this by utilizing the same procedure as GitHub - tedrick/SyncSurvey: Synchronize a Hosted Feature Service to an Enterprise Geodatabase (assuming this tool isn't working for you):
Use the CreateReplica endpoint of the of the feature service (Create Replica—ArcGIS REST API: Services Directory | ArcGIS for Developers )
Hi James, I am struggling with this.
Unfortunately our work proxy wont allow me to do this via a script, so I am trying to do it manually.
my data is structured:
Header Table > Repeat > Photo attachment
If I use the 'Update Data', the header table data appends, but no data populates the repeat or attachment tables
I had a workaround that I published here Transfer data from old survey to new survey breaks relationship class however this doesn't work anymore.
If I use pro to append, I can append the header table. When I append the repeat table I get a 'general function failure'. I also can't get it to 'Copy/Paste'. It seems that it is trying to maintain the globalID (even though I have turned off 'maintain globaids' and removed globalID from the field mapping) so throws an error as it cant edit the field.
What am I missing?
Here is the error from the copy/paste:
Based on your description, GlobalIDs in the repeat table would need to be preserved to maintain the relationship to the photos, correct? It sounds like either data was previously submitted or copied over - can you select just the new records to append across?