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.
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.
@DougBrowningsuggestion is a good option for sure.
I will add a slightly adjacent option here since it may work in your case:
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.
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.