Survey123 feature class as a related table

36921
87
Jump to solution
08-22-2016 09:43 PM
GordonSumerling
Esri 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
TaraBoswell
New Contributor III

I just got this error message for the first time. We have a feature service (containing a polygon layer, a point layer and a table, with relationship classes built between them) that we published up and built a Survey123 form off of. I have this feature service loaded in a webmap with the custom popup configured for the polygon layer set with the following custom url that launches the survey built on the point layer:

arcgis-survey123://?itemID=38aa200d56b74cada63ff34d00b34dfe&field:test={GlobalID}

Here is a snapshot of the Survey123 form.

Right now I have a test field that i'm passing the globalid of the poly layer. The webmap is used in Collector to gather our field data, so we have the calculation added to deal with the curly brackets issue for populating the parentglobalid field (it is set as GUID field). This was working fine in the Webmap and on my Android device. My coworker just tried it on his iPhone though and the globalid wasn't coming across at all. I read about iOS and it being case sensitive so I went back and changed the URL to {globalid} instead of {GlobalID}. That seemed to work, until he went to submit the survey...then he got the Code 1000 error that Cinthia Eichhorn posted. The ONLY thing that changed was the case of the field. Any thoughts what could be happening?

(note: the survey123 form populates the fields on the point layer and it contains a repeat that populates fields on the related table. The architecture for the form was generated when we chose to build the survey on the point feature layer...it recognized that it was related to a table and the repeat was built in)

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Tara,

Thanks for the description.  I've tried to replicate the scenario you described.  Would you be willing to share the XLS file of the survey?  It also might help to see some information about the service, especially the field listings for both the polygon and survey layers.

0 Kudos
TaraBoswell
New Contributor III

Looks like a false alarm James. I think we had a buggy app install on the iPhone. I happened to test it out on the new iPads we got and it worked fine, so my coworker uninstalled both Collector and Survey123 from his iPhone, and then re-installed and tried again, and now he is having no problems. Survey123 stores the data in sql lite database on the phone right? Guessing when the app installed the first time, something glitched with that and the data wasn't able to go in properly. At any rate, just wanted to let you know the problem has resolved, thank goodness!

0 Kudos
WASHSECTOR
New Contributor II

Hi, Hope this message finds you well.
I have a question: It is possible to collect data using survey 123 for missing field in hosted feature layer.
Below an example:
I have a hosted feature layer having some data collected using survey 123. the first 10 fields were filled.
After a while, i need to do another assessment for the same site. I added the fields (6 new questions) in the hosted feature layer and submission url. now i can do the new assessment (and fill the new 6 fields) but only from the inbox.
What i am asking is to collect new  submission and according to a field (e.g. pcode) inside the assessment the data will be filled in the correct record. 
Thank you,
waiting your reply.

0 Kudos
LiinaTamm1
New Contributor II

I'm having trouble integrating Survey123 with Collector. I have trashbins as a feature class and maintenance table as a related table. I tried the new update what Ismael Chivite described and i was able to create a form using a related table of an existing feature service. Ahjung Kim had problems with orphaned records and the issue was with the URL schema. I am also having problems with orphaned records: i can't pass the global id of the parent layer to the parentglobalid field of the maintenance table. I checked the URL schema and it seems to be fine. What could be the problem?

The web map of the trashbins http://www.arcgis.com/home/item.html?id=09c608097c2542af883808d8551789ab 

Survey http://www.arcgis.com/home/item.html?id=4cc3c919ecc1488f894696fe56b3cd45 

ColinCampbell
Occasional Contributor

I'm having exactly the same sort of issues.  I've followed the above thread (which is really helpful btw), but I keep getting orphaned records, apparently due to the globalid not being successfully passed to parentglobalid field.  If I pass the globalid into a different field in child/inspection table (one that's text rather than a GUID field) it goes in fine, but any attempts to get it into the parentglobalid field and it's blank in the underlying table.

I've tried submitting records from a couple of devices (iOS, Android and Survey123 for ArcGIS), depending on what I use I either get no errors on submission or a couple of different send errors (e.g. 'Code 0' with no further details).

It would be great to find a solution to this as it would really open up Collector and Survey123 for us.  Happy to attach details of the feature layer involved, but they look very similar to the above.

Many thanks in advance.

JamesTedrick
Esri Esteemed Contributor

Hi Liina,

In looking at your form, you don't have the parentglobalid field listed in the XLSfile.  it would need to be in the form explicitly (as opposed to just relying on it being created).

0 Kudos
LiinaTamm1
New Contributor II

Thank you for taking a look at it! So my issue was that I added the parentglobalid field in ArcMap when I created the related table for my features. And when I added the parentglobalid field in the XLSform, it solved the problem, but partially. I was able to call out Survey123 from ArcGIS Online web map and the parentglobalid was passed to the survey form. But if I open the map in the Collector app and call out Survey123, the records are still orphaned. I am using Android.  The URL schema what I used is arcgis-survey123://?itemID=4cc3c919ecc1488f894696fe56b3cd45&field:parentglobalid={globalid}. What could be the issue?

The web map of the trashbins (the old one broke) http://www.arcgis.com/home/item.html?id=9de0dc8b9bf545a18e3d2b8cd44decf6#overview

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Liina,

The issue is that Collector presents the globalid slightly differently than the web map - it places curly braces around them.  See my response to Aaron above:

Hi Aaron,

 

You could do this in the survey form- have the globalid come into a text file question and then use a substr() function to remove the curly braces

substr(${incoming}, 1, string-length(${incoming}) - 1)

0 Kudos
LiinaTamm1
New Contributor II

Hi James,

I'm still having some problems . I inserted the function to the crossing of calculation field and parentglobalid row and then I got a very long error message. My function was substr(${parentglobalid}, 1, string-length(${parentglobalid}) - 1).

I added screenshots of the beggining and ending of the error.

I don't know if it's important, but the parentglobalid's row type is text and esriFieltType is GUID.

0 Kudos