Select to view content in your preferred language

Feature Layer (point) to Form Relationships Using Repeats

840
5
06-26-2023 06:40 PM
GarrettRSmith
Frequent Contributor

Hello All,

I am working on a project that includes one survey with four repeats, the .xlsx form is included. 

There are a number of questions that I have about how to use this data once it has been collected. These might be simplistic questions, but I feel like I am overlooking something before this survey goes live and I wanted to post something to the community before it is available for widespread use.

Users will access these surveys via FieldMaps and pop-ups on the appropriate feature layer that will link to the correct survey. In this example, the FieldMaps map consists of polygons and when the user clicks on the polygon (park or open space) a pop-up includes a link to the Parks or Open Space survey. The survey has a field, location, that inherits the name of the correct park or open space area, and then places that location in each of the repeats. 

The first repeat, pos_information, includes a geo point question because the users want to know exactly where, within the polygon, that the survey was taken. I am trying to figure out how the forms are related to that particular point. When I open the test data on survey123.arcgis.com I can see that the point feature layer and the other repeats are linked to one another. However, when I open the data in ArcGIS Online I am not sure how to relate the table(s) to the point(s). I would like to create a hosted view of the points with the forms via MapViewer Classic. 

Screenshot 2023-06-26 at 7.29.02 PM.png

Screenshot 2023-06-26 at 7.30.27 PM.png

Upon further reflection I do not think that I designed this properly because the park or open space name would not be unique if multiple points are collected within the same park or open space polygon. So, I would like to include the points collected via the geo point question on the FieldMaps map so that records for the same points can be collected over time. I can create specific pop-ups for these feature layers. However, for the original data, should I create a field in each of the repeats that uses the GlobalID created via the original point feature layer and if so, how would I do this?

Please let me know if this makes sense and if you need any further clarification to provide any guidance.

Thanks 

0 Kudos
5 Replies
DougBrowning
MVP Esteemed Contributor

I think you want what I do is have a main Parent record linked to several forms.  I do this by creating my own service that has all the 123 layers and relates in there plus my own relationship class linking the main point to the form or forms.

See my write up in this post.  https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-... 

Note it s bit more advanced workflow to setup but it works great.  Hope that helps

0 Kudos
GarrettRSmith
Frequent Contributor

Hi @DougBrowning 

Thanks for the response.

If I am only needing to link the point feature class, collected in the first repeat, to the other three repeats contained within the same survey do I need to download and bring everything into ArcPro and re-upload into ArcGIS Online? Doesn't publishing the survey from Survey123 Connect automatically create the relationships between the point and the forms? 

My confusion is how the geo point question can or is related to the forms. Maybe I should take it out of the pos_information repeat and place it in its own repeat and have it relate to the forms?

As for FieldMaps, I am hoping to pass both the polygon name and and the GlobalID to Survey123 and have those fields populated automatically. It would be the GlobalID from the point feature created in the process outlined above. Now that I think about it, it seems like the geo point question should not always be available because if people click on the point within Field Maps, that will capture their location.

Thanks, and please let me know if this makes sense.

Garrett

0 Kudos
DougBrowning
MVP Esteemed Contributor

If you have the main top level point and the repeats all in one form then yes 123 does the relates for you.  But it sounds like you do it more like I do.  The main top level parent point is static and prepopulated then the repeats are forms.  If that is the case then the top level is not in the form.  So you have to add your own relate.  You can also do both so the static point is there and the form has a parent level also.  We kind of do this.  I always have some type of geopoint in the form so I know where they were.  We have crews pick the wrong point and launch on the regular so then we can see where they were standing and its an easy fix.  

Hard to explain but here is it working where we have pre populated geometry that passes a key to the form.  Then on form save it auto flips back to field maps

 

Launch 123 with callbacks.gif

 

ShowRelatedLPI.gif

Hope that makes more sense

Then in the map I can link to any form from the main point.

 

0 Kudos
GarrettRSmith
Frequent Contributor

Hi @DougBrowning 

Thank you for the gifs, they helped explain a lot.

I wanted to provide a clarification of what our workflow looks like:

Our "study areas" are polygons (parks and open spaces) in FieldMaps and we are asking volunteers and agency employees to use FieldMaps to select the area they are at. The polygon pop-up contains links to the Survey123. Currently, I am passing the parks or open space name to Survey123 from the Field Maps pop-up. However, I recently realized that this is not smart since this name would not be unique to each point, though I still want to know what polygon the data was collected within so I am going to keep that in. 

We created a geo point question within the first repeat because some of these areas are quite large and we wanted to know specific locations on where the data was collected in case that someone would have to return to complete what we are calling an "action". If an action is needed, I am going to create a points feature layer to include in Field Maps (containing a link to the same survey) so that the appropriate people can know where to navigate to and so that they have the ability to record the action taken. I would like to pass the GlobalID from the point to the forms so that they will be related, which I have done in previous Field Map/Survey123 projects.

Where I am getting tripped up is how to incorporate a geo point question in the survey that would be related to the three repeats that are hosted on the survey form and would only be necessary if the user is creating a new observation and not interacting with a point that already exists in FieldMaps. I am thinking how and where to place the geo point question because if they are already working off a point within Field Maps, there is no reason for them to create a new point. Should I create a geo point repeat at the top of the form that is only displayed if no GlobalID is captured from Field Maps (i.e., the user clicks on the polygon and not a point)? Or maybe a conditional question in this initial repeat that asks the user if they are collecting a new point? 

Maybe that clears things up?

0 Kudos
DougBrowning
MVP Esteemed Contributor

I would just always have a geo point since then you know if they clicked on the wrong polygon.  

I would just add a question is this a new polygon? or something like that.  Then QA that before making it an official point.  Letting users just create new "official" data never works out.

In the end just pass the id to the form and down to each repeat then relate the main point to the main polygon and call it good.  It should work out.

I personally do not use globalids and instead a polygonid I know is unique.  If you ever download and process this data into a SQL server or something like that then the globalids all change and its a bad time.

See this post on why I do not use globalid  https://community.esri.com/t5/arcgis-collector-questions/related-tables-for-offline-data-collection/...

But up to you.

 

0 Kudos