Select to view content in your preferred language

Populating Survey123 answers with related tables

993
2
01-02-2020 08:54 AM
ChandlerCallison
Regular Contributor

I'm creating a survey for meter inspections that will be launched through a popup in Collector. Some of the information needed for the survey is in the meter feature class, so I can autopopulate those survey answers easy enough with the Survey123 URL scheme. There is a table that is related to the meter feature class though, and some of the survey answers need to be populated with info from that table. Is that possible? Do I populate those answers using the Survey123 URL scheme as I would with any feature attribute, or do I need to do things differently since I'm wanting to pull from a related record? I can't seem to find anything about it on the forums.

0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

Is it a 1:1 or 1:Many relationship?  If 1:1 you can use {relationships\0\field} to pass.  If 1:M it will not know how to give just 1 value so it will only give a count or sum.

You can get to the related values using Arcade also.  BUT for now the code for this will not work when offline.  Esri did tell me it was coming around beginning 2020 but I have not seen it yet.

There a few posts on this.  Start here maybe  https://community.esri.com/thread/214973-avoid-collecting-existing-item-in-survey123 

Hope that helps.

by Anonymous User
Not applicable

Hi - having the same problem. To Doug, when you say using {relationships\0\field} to pass, do you mean adding it to the link URL in Configure Popup in the AGOL Web Map of the feature service?

example:

arcgis-survey123://?itemID=t34example32183129083fdsitem231ID336&field:ParentGlobalID={ParentGlobalID}&field:NAME={relationships\0\NAME}

Clarifying that you don't mean like below, with forward slashes in the attribute field and not backslashes:

arcgis-survey123://?itemID=t34example32183129083fdsitem231ID336&field:ParentGlobalID={ParentGlobalID}&field:NAME={relationships/0/NAME}

Either way, both don't work for me and I'm at a loss for what I'm doing wrong.