Select to view content in your preferred language

Create Relationship Between Survey 123 Results and Point Feature Layer?

174
4
yesterday
KSteeleGC
Emerging Contributor

I am trying to create a map in AGOL where one can click on a fire hydrant and view the related records in the pop up from a Survey 123 form. I don't want it to populate any fields in the original data - just show the inspection forms from Survey 123 in the popup for fire hydrants. I am having a lot of trouble figuring this out- any help is appreciated. 

Thanks!

0 Kudos
4 Replies
DavidSolari
MVP Regular Contributor

I'm unclear what your exact workflow is, but you can link to an existing survey form from a popup using an Arcade expression like this:

"https://survey123.arcgis.app?itemID=<your survey item id here>&action=view&q:globalId=" + Lower(Mid($feature.GlobalID, 1, 36))

For more info on what types of URL parameters you can include check out the docs. You can either add this to the related table's pop-up or use some more arcade to find the most recent survey entry and link to that from the hydrants, lots of options to play around with.

0 Kudos
KSteeleGC
Emerging Contributor

Thank you for your help.

Sorry if i was unclear. What I would really like to do is have the survey 123 form populate a new table and create a relate between this table and the original fire hydrant feature service, then show the related records in the attribute for each hydrant.

0 Kudos
DavidSolari
MVP Regular Contributor

It sounds like you want to use Survey123 to add and edit records in a related table to the hydrant points. This blog post can get you started on linking a survey form to an existing table. You will have to build the table yourself but as long as you pay attention to the field names and data types this should be fine. You can then use app links like I mentioned above to give Field Maps users a quick link to Survey123.

0 Kudos
KSteeleGC
Emerging Contributor

Do you know how to create a table from the Survey123 form that I can relate to the feature layer?

0 Kudos