Survey123 version 3.7.62 (Unsupported relationship type)

3293
13
Jump to solution
12-31-2019 03:29 PM
jjeremy525
New Contributor III

Hello,

I used ArcMap 10.6.1 to publish a feature service to AGOL for a polygon layer that contains an APN field and some other field data not needed and I have a stand-alone table with a APN field and blank rows for fields FirstName and LastName. I used ArcCatalog 10.6.1 to create a relationship class between the polygon layer and table based off the APN with a 1(parcels)-Many(APNs table). I am trying to create a survey from Survey123 Connect for ArcGIS version 3.7.62 and create the survey from the feature service option since I uploaded the parcels and table to AGOL.

One of the questions comes from the polygon layer with the field called “SurveyComplete” and it updates a polygon based on if the answer is “Yes” or “No”( making it green if Yes or no fill color if No). We are trying to create the survey to have multiple responses on each parcel a 1 (parcel) to many (related Table), since many surveys can belong to one parcel. Not sure if this is possible since I am trying to get a field answered with a Yes in the polygon layer and I want other questions answered in the related table to store separate information. I keep getting this (Unsupported relationship type esriFieeldTypeString in key field APN for table APN), please see below and attached is the survey XLS form. Can anyone please lead me in the right direction.

0 Kudos
1 Solution

Accepted Solutions
Jim-Moore
Esri Regular Contributor

Hi Jeremy

Launching a survey in the field app or web app from a URL will usually open a new survey - that is, to collect a new feature (in this case, a new parcel polygon). However, it is possible to edit an existing feature in the web app using the mode=edit URL parameter. The web app needs to know which feature you wish to edit; this is specified using the additional objectId parameter. This editing method is explained in detail in this handy blog (including instructions for launching an edit from a pop-up in a web map): https://community.esri.com/groups/survey123/blog/2019/05/24/survey123-tricks-of-the-trade-editing-re... 

Editing in the web app is also documented here: Edit existing survey data—Survey123 for ArcGIS | Documentation 

More on URL parameters for the web app here: https://community.esri.com/groups/survey123/blog/2019/02/06/survey123-tricks-of-the-trade-web-form-u... 


Regarding your second query - the field: parameter will not work with mode=edit and is not supported for questions in a repeat. If the APN is stored in the parent layer, one option would be to make the APN question in the repeat read-only and use a calculation to make it inherit the APN from the parent.

Hope this helps,

Cheers,

Jim

View solution in original post

13 Replies
Jim-Moore
Esri Regular Contributor

Hi Jeremy

From your description and screenshot, it appears your feature service is using the 'APN' text field for the relationship.

To work with Survey123, relationships must be based on Global IDs.

Please find feature service prerequisites and other useful info here: Use Survey123 with existing feature services—Survey123 for ArcGIS | Documentation 

And also described in this detailed blog: https://community.esri.com/groups/survey123/blog/2017/09/25/working-with-existing-feature-services-i... 

Hope this helps.

Cheers,

Jim

jjeremy525
New Contributor III

Thank you Jim for your response I will use Global IDs instead. My other question is I have a question from the polygon layer that has parcel data with a field called SurveyComplete and symology changes on the parcel based off if it saids Yes or No. I want that in the survey along with other questions that will be stored in a related table. But in the survey settings there can only be one form_id which is set to SL_FloodZone_Parcels (polygon layer) and not the related table.

I tried just using the listed layer in the form_id but when surveys are created it creates another feature which I don’t want. I want the parcel numbers to stay the same and have multiple sources against each parcel which is why I have the relate table to store other questions. My question is it possible to have a survey update the polygon layer SurveyComplete field and store questions that are put in a relate table or can only one layer/table be updated per survey?

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Jeremy

The parent layer and its related table(s) can be in the same survey form. In your XLSForm, the related table fields are accessed through questions placed inside a repeat section (denoted by begin repeat and end repeat). The questions outside of this repeat section relate to fields in the parent layer. Please see our documentation on repeats: Repeats—Survey123 for ArcGIS | Documentation 

Survey respondents could browse the parcels from the Inbox, open the relevant record and add new repeats (i.e. add records to the related table) or optionally edit existing repeats, while also updating the fields in the parent layer. Please see this documentation about editing existing survey data via Inbox (includes section on repeats): Prepare for editing existing survey data—Survey123 for ArcGIS | Documentation 

Cheers,

Jim

0 Kudos
jjeremy525
New Contributor III

Thank you the relationship works great! We are using a web mapping application hosted on AGOL and I want the user to select a parcel and a pop-up comes up with a link to the survey which is working. But I want the "SurveyComplete" field to be hidden and update to a "Yes" by passing a URL Parameter after the survey is complete which I hope I did right: (https://survey123.arcgis.com/share/cb6ab59c07ec468981408fb230c5b4b1?field:SurveyCompleted=Yes). But it adds a record to the parent layer instead of just updating the attribute. Is there a workaround this or can the field not be hidden but the user must select yes?. I don't want records added to the parent layer (parcels-polygon layer) just the SurveyComplete field to be updated just to the related table. Also, can URL parameters be passed down to repeats because I tried to have attributes passed down to the repeats such as APN but it would not. Just to clarify we are collecting the surveys purely from the web mapping application that the survey is linked to in the pop-up. So editing from the Inbox will not work for us.

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Jeremy

Launching a survey in the field app or web app from a URL will usually open a new survey - that is, to collect a new feature (in this case, a new parcel polygon). However, it is possible to edit an existing feature in the web app using the mode=edit URL parameter. The web app needs to know which feature you wish to edit; this is specified using the additional objectId parameter. This editing method is explained in detail in this handy blog (including instructions for launching an edit from a pop-up in a web map): https://community.esri.com/groups/survey123/blog/2019/05/24/survey123-tricks-of-the-trade-editing-re... 

Editing in the web app is also documented here: Edit existing survey data—Survey123 for ArcGIS | Documentation 

More on URL parameters for the web app here: https://community.esri.com/groups/survey123/blog/2019/02/06/survey123-tricks-of-the-trade-web-form-u... 


Regarding your second query - the field: parameter will not work with mode=edit and is not supported for questions in a repeat. If the APN is stored in the parent layer, one option would be to make the APN question in the repeat read-only and use a calculation to make it inherit the APN from the parent.

Hope this helps,

Cheers,

Jim

jjeremy525
New Contributor III

I have the APN field in the parent layer and I have made the APN in the repeat layer read-only in the XLS Form. I think this will be my last question I need, how do you create the calculation formula within the XLS Form to inherit the APN from the parent layer when the parcel is selected in the web map? Do you by chance have any examples or documentation? I tried looking at the Survey123 Formula documentation Survey123 Formulas but found one that would help in this situation. Thanks again for all your help!

0 Kudos
DougBrowning
MVP Esteemed Contributor

Just grab it from the parent.  So just ${APN}

0 Kudos
jjeremy525
New Contributor III

That won’t work for us Doug, we are getting the APN from a Web Map based off the user where they select whatever parcel they want. So I can’t use that formula since it is not a question in the first layer(Parent-Parcel Polygon). I need the APN to go in the repeat APN question so we capture it with the users survey. We were using a URL Parameter mode=edit but you can pass the field:parameter in edit mode.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Then add it to the parent.

You would pass to the parent then inherit for each repeat.

Parent

text LineKey Line Key

In the repeat

hidden RecKey Line Key  ${LineKey}

Jim pointed this out above already

Regarding your second query - the field: parameter will not work with mode=edit and is not supported for questions in a repeat. If the APN is stored in the parent layer, one option would be to make the APN question in the repeat read-only and use a calculation to make it inherit the APN from the parent.