Select to view content in your preferred language

Publishing Survey but stuck on Creating Data Relationship

406
5
02-22-2024 09:17 PM
ekangeles
New Contributor II

Hello 

Does anyone exprience being stuck on Creating Data Relationship while publishing a survey form using Connect. I am trying to publish my test form but for almost 3 hours now the survey is still Creating Data Relationship. Is there any way I can speed this up? 

0 Kudos
5 Replies
ChristopherCounsell
MVP Regular Contributor

Have you had success working with surveys this large before?

You have 179 repeats. Tiers of nesting. Over 3000+ rows in the XLSForm.

I can't imagine this leading towards good performance at all and am not surprised seeing it have issues on publish. 

Can you break up the survey into multiple forms or otherwise look to reduce the complexity/length of the survey?

 

0 Kudos
abureaux
MVP Regular Contributor

That's a lot of repeats... From my experience, my largest survey has ~53 repeats and it's a beast. Trying to republish it is a nightmare. You have TRIPPLE that. I honestly don't know if Esri can handle that much.

And that is to say nothing about performance in the field. Loading and submitting my survey takes a noticeable time. Manageable, but I wouldn't want to push things beyond where I currently am.

I would consider a different approach. As @ChristopherCounsell mentioned, breaking up the survey could help.

ekangeles
New Contributor II

Hi Christopher, 

No actually this is my first time doing this kind of survey. The client wanted several loops. and be stored in one database. Is there a way I can break this to multiple form? Is that like a another form is link to this one, once a encoder choose a certain selection. 

 

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Imagine you have a restaurant and are doing reviews. You would have a data structure like:

  • Geopoint layer (restaurant location, name, address etc)
    • Reviews table (reviewer, score, date)

This is a 1:M relationship. Instead of doing all the reviews within the survey that creates the restaurant, it's better to create the restaurant and then submit all the reviews against the review table - one at a time in separate survey submissions.

So what you could do with this is:

  1. Use Survey123 to design a survey form and publish the layer schema
  2. Setup a mechanism to create restaurants (points) e.g.
    1. Standalone survey
    2. Web Map (Field Maps) form
    3. Load in restaurant data via geocoding, append, etc
  3. Setup a survey123 form to only target the reviews table
    1. Survey123 target an existing service
    2. Remove the restaurant questions and begin/end repeat for the reviews
    3. Update the form_id so that it's targeting the review table
    4. add a parentglobalid field with hidden appearance, to accept the globalid via custom url parameters 
  4. Create a custom URL scheme to launch the survey (e.g. from field maps) passing in the globalid into the parentglobalid

The above example is a common but relatively advanced survey workflow, with only one repeat. You can see how it might expand into several repeats - e.g. additional tables for deliveries, complaints, audits. A separate survey form could be created for each one. Streamlines data collection and makes for a good end-user experience.

The XLSForm provided is so large it's difficult to know where to begin. I'd recommend shifting the mindset from 'do all survey in one form' to 'create the asset (house) and submit several, smaller surveys with an ID key to relate them back'. If 179 repeats are really necessary you could consider creating several separate hosted feature layers and using a custom guid field to link them back to the original asset (house). This will let you access the data in ArcGIS Online with Arcade FeatureSets or do back-end database stuff one exported.

I can also see some repeats having a 'repeat count' of 1, so there's possibility that you could flatten your table structure a bit.

Unfortunately you have a bit of work cut out for you...

0 Kudos
DougBrowning
MVP Esteemed Contributor

My trick of relating multiple forms together to a parent may work for you.   https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...

I have close to 2,000 fields for some programs so I break then into 10-15 forms.  Bonus we can use multiple tablets at once.

Hope that helps

0 Kudos