Relating Survey123 surveys

3687
6
09-06-2017 12:23 PM
deleted-user-FTxtuSQd67Ur
New Contributor III

I have a question regarding some surveys I have created for our field workers to go out and inspect homes.

While out in the field, they will be filling out multiple different surveys within Survey123 for a home.  All of these surveys are separate from each other, however, there is one survey I am using as my "base form" that will be the survey that the relates are based from.

Even though the surveys are separate when they are filled out, I would like them to be able to relate to each other when they are submitted (i.e. that an admin could go into a web map on the backend, click on the location of a home, and see all of the related survey information attached to it instead of clicking between a bunch of different points in the same location.  I do have a common field between all of the surveys which is the address. We do not have Portal we use ArcGIS Server and AGOL.

Is there any way that I can do this currently??

Thanks!

Carissa

Tags (3)
6 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Carissa,

You can accomplish this setup either in Survey123 Connect or using ArcGIS Desktop to first author the tables and then create surveys based on them.

Using Survey123 Connect, I would create a 'master survey' that contains the base survey as well as all of the secondary surveys- the secondary surveys being placed in repeat sections.  When published, this will create all of the tables to store the surveys.  If using ArcGIS Desktop, create the feature classes and tables for the surveys, adding in a guid field into each ( it will be an id in the basic survey and parent_id in the others).  Then create a 1:M relationship class for each other survey to relate the id of the basic survey (our 'parent') to the parent_id field in the other survey (the 'child').  Publish this as a feature service.

Either way, once published, you will want to create the individual surveys by using the "Create New" > "Feature Service" method detailed in Use Survey123 with existing feature services—Survey123 for ArcGIS | ArcGIS .  This will create a survey form initially with all of the questions from all of the forms; you then remove all but those for the particular form you working on,  removing the begin repeat and end repeat lines that surround the form's questions. Update the form_id setting in the worksheet to the name of the table and that will write the data to the already-published table.

TaraBoswell
New Contributor III

I think this might have just answered a question I posted recently. We have a similar workflow. We have been going back and forth between the best method to do it though, as completely separate surveys that somehow get related to each other (possible???) or as one survey with the different workflows as related tables. Our main concern with the latter scenario is what happens if we need to modify/update one of the surveys, especially if schema changes are needed (new questions, deleting old...). Does the whole thing need to get republished (and so folks trying to collect data using the other surveys keep getting impacted) or is it possible to republish the one modified survey (that changes one of the related tables) without interfering with the rest of it? It is really important that we have the flexibility to modify our data processing survey forms without taking down our field data collection and holding up the field staff every time.

Thanks!

JamesTedrick
Esri Esteemed Contributor

Hi Tara,

Since this process relies on you doing the schema changes outside of Survey123, you would only need to update the forms that had their tables change.  This also uses Working with existing Feature Services in Survey123 for ArcGIS pattern for creating the survey.

PetronilaMandeno
Occasional Contributor II

Add on question, what if the surveys are already published and currently in use? Might I still be able to somehow merge the two? They wouldn't have to use the merged database as a survey, but rather just generate reports from it. Any advice for that scenario?

0 Kudos
DougBrowning
MVP Esteemed Contributor

I do this a lot with up to 9 surveys.  See my post here   https://community.esri.com/thread/221263-mapping-with-survey123-within-a-polygon-or-admin-unit 

PetronilaMandeno
Occasional Contributor II

Thank you! I'll read through all the steps and make the attempt tomorrow. Fingers crossed!

0 Kudos