Survey123 feature class as a related table

37271
87
Jump to solution
08-22-2016 09:43 PM
GordonSumerling
Esri Regular Contributor

Hello All,

I need to understand how it might be possible for my Survey123 feature class to be a related table to a polygon feature in the map.

In essence I have a farm field feature class and I want to perform an inspection against this. Conventionally, I would create a feature class to represent the farm in ArcMap and then create a related feature class in ArcGIS that is the inspection feature class. Now I could use this in collector. However, I want to take advantage of the field manipulation capability of Survey123. 

The inspector already knows the farm ID so he just needs to perform the inspection with survey123. So the question is how do I publish the survey123 feature class and then relate it to the farm polygon feature class in ArcGIS Online?

Cheers

Gordon

87 Replies
KrisRobbins2
New Contributor II

Yukun,

When you state above that you "passed the primary key value from the parent to the parentID field with URL" what exactly does that step entail?  I've done everything else in this post to get my Collector/Survey123 related table process up and running but still get orphaned results...I'm not clear on how to pass along the parent primary key using URL.

0 Kudos
YukunXing
New Contributor III

Kris,

It's been a while since I last used it and my own example have been deleted, so I'm just copying from my old notes. Assuming you publish the FC/table with relationship and add the service to a web map (which will be used in Collector). The URL part is done on the web map via "pop-up" configuration of the parent ("asset", using my "asset" and "Inspection" example).

1.

2.

This was the link in my test:

arcgis-survey123://?itemID=ba6b648f7ee64147899e5f3f67bd8d1e&field:parentID={GlobalID}

In this case “parentID” is the GUID field of the “Inspection” table, and “GlobalID” is the GUID field of the “asset” feature class, and they are what’s used as foreign key and primary key respectively in the relationship class.

 

The itemID in the “Link” can be obtained from ArcGIS Online when you clicked on the form item, e.g.:

Hope this helps.

0 Kudos
JDSF_PeterRowland
New Contributor III

Hello James/Yukun!

Ive been running into that same error, and it seems like Yukun and I are working a similar projects. At first I didn't realize but I was linking two globalid fields as the origin/foreign keys, because while creating the relationship I'm unable to select anything BUT the globalID for the foreign key. I have a GUID field that I made, but it wont let me select it. Any ideas as to why that is?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi,

Are using ArcGIS Pro or ArcMap?  Either should be showing all the fields of the same type as the origin key field.

0 Kudos
AnnaMorris1
New Contributor

Hi Everyone,

I am new to Survey123, and am trying to set up 3 related forms (i.e. Form A,B & C), each with a one to many relationship. At form A, I just need to be able to collect the date, then I need to be able to add multiple entries of Form B. From form B I then need to be able to place a point and collect additional information (From C). This seems easy feasible to set up when there are 2 related forms, but I am struggling with the workflow to make this happen with the 3 levels. I have tried following a version of the workflow that Gordon used above, but with no success. Is anyone able to provide any insight on this?

Than you in advance!

Anna

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Anna,

Are you letting Survey123 Connect create your surveys, or do you have an existing table structure?  If using Survey123 Connect, you will want to set a form that has all of forms A,B,C together and then create individual forms once that has published.  Form C is what we call a 'nested repeat', that is a repeat within another repeat.  Take a look at the 'Nested Repeat' sample available via the 'New Survey' > 'Samples' section.

0 Kudos
AnnaMorris1
New Contributor

Hi James,

I had published from an existing table structure, as I need to be able to import and edit existing records. I would like to have the survey nested in a dashboard, with an accompanying web map (in a web app) so that queries can be performed, but when I add the survey to the dashboard it comes up with the following error: 'Error: Initializing form...Currently, nested repeats are not supported in the web app. Submitting records to this survey may lead to unexpected results and possible missing data'. Is there a way to be able to use a form with nested repeats on a desktop application?

Thanks,

Anna

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Anna,

Are you seeing the error message with the forms that only have a single table (though the structure is a nested repeat overall)?

0 Kudos