Select to view content in your preferred language

Pass a Parent ID from one survey to others completed during the same trip

405
4
11-19-2024 06:09 PM
FynnUnderwood
Emerging Contributor

Hi Survey123 community

In my organization we have trips that go out into the field to collect a range of different data (I currently have 9 surveys that field workers may need to complete). I need to be able to link all of the surveys back to an overall 'Trip ID'/'Parent ID' so data can be attributed to the trip it was collected on. 

So far, I think there are three ways of setting this up in Survey123 Connect.

1. Create a 'Trip Form' with key information that field workers complete at the start of a trip. Have all the other surveys that field workers may need complete displayed as custom URL scheme links in the 'Trip Form' that will pass the 'Trip ID' and other key information into the relevant survey. I have read about this being done (here and here) and have been able to successfully set it up. This is my preferred method at the moment, but I think it will potentially be confusing for users in the field.

2. Set up a single survey where the 9 surveys are all repeats of the Trip form, which will automatically pull the 'ParentGlobalID' into the child surveys. However, I'm hesitant to do this as it will be a lot of data in a single survey and will likely become confusing for user in the field as well as when managing the data in the backend. 

3. Use the 'pulldata' function to have each survey linked to a feature layer containing survey information from the Trip Form including a 'Trip ID', however as far as I know this won't work offline, and field workers are often out of range for long periods.

If anyone has experience implementing something similar and can provide any info on how you set it up it would be greatly appreciated. 

4 Replies
DougBrowning
MVP Esteemed Contributor

This is what we do with up to 15 forms related to the main parent.  The trick was to use Field Maps as the base.  This actually works out well since Field Maps is spatial it is great for crews getting to the location.

We preload all the sample locations they are to visit with all the important attributes.  In the popup of these we have launch links that open the different 123 forms sending several fields over to dynamically change the form for that site and pass over the relationship key.  This way all the sub forms are related back to the main form.  We do NOT use globalid for the relates, well its still there we just have a second related id that we pass back and forth.  If you ever export or import your data around globalid falls apart on you fast.

In another project we even fill out a site visit related record in Field Maps and add some info like measurements of the site then use arcade to calc some numbers and a on the fly, and an ID that uses the current date, then we use that to send to the form.  

I did a big write up on this awhile back here  https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...

I know this is 2 apps but Field Maps is good with well maps and 123 is good for forms so they work really well together.  Works slick.

Launch From Collctor tablet.gif

abureaux
MVP Frequent Contributor

@DougBrowningsuggestion is a good option for sure.

I will add a slightly adjacent option here since it may work in your case:

  • All projects start with our Project Hazard Assessment (PHA) form which staff fill out in-office. It contains numerous options and may result in up to ~15 extra forms needing to be filled in.
  • Just this year, I have begun to strip out all the project detail fields from these "related" forms and replace them with a single "Safety Form ID" field which will relate back to a single PHA.
  • Related forms can still be completed in the field (where needed). The field staff just need to know their Safety Form ID. When back in internet range, the forms will send off and be automatically linked to that specific PHA via the ID.
  • I created a Power Apps app to manage PHAs and dynamically show links to related forms so office staff can jump directly into a specific related form (and auto-fill in that Safety Form ID). I also send an email with quick links. These two options are basically replacing Field Maps in my case. PHAs don't always have spatial data, and the related forms are a mix of in-office and in-field forms, so this set up is considerably more convenient.
    abureaux_0-1732123644293.png

     

DougBrowning
MVP Esteemed Contributor

Only issue I see here is users manually typing in IDs.  This is the whole reason we went to read only IDs and passing them in as the crews got them wrong all the time.  In fact the last 3 jobs the biggest QA issue was users typing in IDs.  With GPS in every form you can figure them out and fix them but its work.  You could add a distance from where you say calc but then you have to keep a csv of lat/longs up to date.  

0 Kudos
abureaux
MVP Frequent Contributor

In most cases, users will be using the Power Apps app within Teams, or a URL to launch into the sub-form. Both of these options automatically add the ID and are available on both PC and mobile (though I expect most to be done on PC). While I do allow for manually typing it in, because sometimes our project work can be weird, this option is at the bottom of the "recommended procedures" list for exactly the reason you mentioned. My goal is to eliminate that option entirely in the future.

0 Kudos