I’ve published a feature service to ArcGIS Online and one to ArcGIS Server (same data structure) which has a point feature class that has two related non-spatial tables. The relationships are built off of the global ID from the point feature class.
When I try to publish a form using Survey123 connect and connect to either of these services I get an error that says the parent relationship is not found. The relationship does exist at the geodatabase level and is visible in the resulting feature services. Am I missing something in the setup of the form in Survey123 Connect?
I got frustrated working this same issue about a month ago and just got back to look at it. Glad I saw your post as it motivated me to try to track this down again.
What I found out is that there are some specific rules in Survey123 for related tables and as far as I can tell they are not published anywhere.
The rules are:
Following these rules I created the attached relationships from your example. I created a GUID field called parentguid in both the parent feature layer and the child tables. Then I created the relationships for each table to the feature layer and labeled both sides of the relationship with the same name as shown in the attached labels image.
When the survey form is created, the parentguid field does not appear in the spreadsheet or on the form. But, when a new inspection is created with the form, the parentguid is apparently automatically filled in with a GUID. When records are added to the tables in the form, their parentguid fields are automatically filled in with the parentguid from the inspections layer.
I verified the results in the REST service and the relationship and related records are there, so I think this is right.
It sounds like ESRI may be planning to support GlobalID's directly in a future release.
I pieced together the solution from the following cryptic post and help file:
https://community.esri.com/thread/192312-survey123-error-global-id-based-relationship-requires-support-for-applyedits-with-globalids
https://doc.arcgis.com/en/survey123/desktop/create-surveys/survey123witharcgisserver.htm#ESRI_SECTION1_147B3E0089E7446290615D3F1D139231
The post says
"Survey123 does not work with GlobalID, GUID relationships for related tables (repeats) with Federated Servers yet. It is in the works but is not there just yet. I believe it may be available in the next release in April?? The repeats use ParentRowID/RelatedParentRowID for the repeats."
and
"Yes, there are a few caveats with relationships. From your description, it sounds as if the *relationship* does not have the same name from the parent and child tables - currently Survey123 assumes the relationship name is the same"
The help file says:
"repeats cannot work with related layers or tables unless the relationship uses a GUID field for the relationship in the parent layer"
It is hard to understand why this is not documented somewhere obvious where we can use it. This is pretty much the traditional model for data collection in the field for things like inspections.
I hope this helps.
Hi Joseph,
We are including the more specific requirements in the next revision of our documentation.
Thank you very much for posting this. This helps a lot and I too don't understand why this isn't documented somewhere else. Sounds like that is happening at the next release though thank you James.
Overall great tool, looking forward to the continued enhancements.
Brian
Is there any more specific info on this? Documentation that you can point to now that we are in March of 2018?
Hi Don,
The documentation page for working with existing feature services, Use Survey123 with existing feature services—Survey123 for ArcGIS | ArcGIS , is up to date. With respect to one of the issues mentioned in this thread (relationships not having the same name on the parent and child side), this has been fixed in Survey123 Connect.
@JosephMootz1 That hint about the labels needing to be the same helped! I downloaded a hosted feature class and related table from AGOL and put it into SDE. I manually re-generated the relationship class and let Pro give default labels, which were different. I kept getting this error and finally, when I checked the downloaded gdb, saw that the labels were simply blank in the original relationship class. That was it.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.