Select to view content in your preferred language

Parent layer ID publish error

429
5
04-03-2025 09:29 AM
OliviaKonieczny
Emerging Contributor

Hello, hoping someone could help me out because I am beyond stuck!

I've created a gdb in ArcGIS Pro with GlobalID > guid relationships and published to AGOL. Lets say my database consists of Parent1 with layer id 1, Parent2 id 2, child1, child2, child3. The ids are from the service item details page.

I am trying to create two separate surveys for the same existing hosted feature layer. Survey 1 has Parent1 in the form_id colum of the xls form and repeats called child1, child2, child3. Survey 2 has Parent2 in the form_id and the same repeats. 

I need this structure because some status fields are edited in the parent layers, and it allows technicians to create entries in each child layer without having to go back to Field Maps and open a new survey for each one. 

When I try to publish Survey 1, I get Parent layer ID 2 not found for table child3. The survey publishes when I remove the repeat called child3. When I try to publish survey 2, I get Parent layer ID 1 not found for table child1. When I remove child1, I get Parent layer ID 1 not found for table child2. 

I found this thread

https://community.esri.com/t5/arcgis-survey123-questions/publish-error/td-p/1009217

and saw that someone was able to fix this by copying the child layer, but this is not an option because I need all the child data in one layer, regardless of which parent it is related to. 

Is there anything I can do to make this work?

0 Kudos
5 Replies
TylerGraham2
Frequent Contributor

Do you have the link for the parent layer set as the submission URL? When you create a new survey from an existing feature service with multiple layers/tables Survey123 doesn't always get the right one and you need to verify. 

Your submission url should look like: https://www.arcgis.com/sharing/rest/content/items/<feature  service id>/<Layer ID>

Layer ID's start at 0 so check your feature service's REST Directory for the layer ID numbers (they are the number to the right of the layer name, e.g. Parent_1 (0). So, for a survey starting at the parent1 level your submission url would be something like: https://www.arcgis.com/sharing/rest/content/items/h342jhjh32l4h1lh4j1bh25bhj4tv/0

Your wording on the form_id made me unsure if you had all the names of parent/child layers in the form_id. You only need the name of the Parent in the form_id column, you set the name of the repeat to the child layer. Also, if any of those relationships are nested (e.g. Parent1 -> child1 -> child3) when creating the survey, you should have to nest the repeats in the survey. e.g. the child3 repeat would have to be inside the child2 repeat.  

A couple other issues I've run into is that the relationships need to be 1:M for Survey123. I've also had issues with pointing multiple relates to one guid field. It sounds like you have both Parent1 and Parent2 relating to the same child tables, so in those child tables you should create 2 GUID fields Parent1_GUID and Parent2_Guid and set the relationships accordingly. 

Survey 123 also can only look down the relationship, not up, so you can create a Parent1 survey and point to child tables as the repeats, but you cannot create a Child1 survey and create a parent repeat.  Your form_id is the name of the layer/table so Parent1 and not the Layer_ID number. It also cannot have spaces in the name, if it does you need to republish your feature service from Pro so the layers/table names in the TOC have no spaces.  

0 Kudos
OliviaKonieczny
Emerging Contributor

Thanks for your comment! 

To answer your questions, my submission_url follows the format you specified and only the parent layer is on the form_id. The child layer names are in the begin repeat line. The child layers have a guid field for each parent, for example child 1 has GUID fields called parent1_id and parent2_id. The relationships are all one to many.

Despite this, I am still getting the error. ChatGPT told me: Survey123 cannot handle shared child tables that are related to multiple parents through separate relationship classes, even if each relationship is valid. I couldn't find that limitation in any documentation, though.

0 Kudos
TylerGraham2
Frequent Contributor

I think ChatGPT may be partially correct, but not for the reason it thinks it is right. I manage a feature service that uses both Field Maps and Survey123 and a key part of it is multiple geometry feature layers (collected in Field Maps) act as parents to a single table (Data entered in 123) for notes which allows all of our field notes to be in a single table. I don't have any issues with it, though I only have one form created from anything in the feature service.  

However, I created a test feature service with 2 parent layers related to 3 child tables to see what would happen. I was able to publish the first survey from a parent layer referencing the child layers without an issue. I ended up with the same problem as you were having when I tried to publish the second survey using the other parent layer with the child tables as repeats. I wonder if this is a bug or an undocumented feature when publishing additional surveys?  It might be worth reaching out to the esri help desk.  

0 Kudos
OliviaKonieczny
Emerging Contributor

Thank you! I will try going to support

0 Kudos
OliviaKonieczny
Emerging Contributor

If anyone else comes across this thread, the issue has been logged as a bug: BUG-000120260