Select to view content in your preferred language

Publish Error

3373
12
12-13-2020 08:21 PM
raybricedev
New Contributor

Hi, I've created a FGDB in Catalog 10.8.  Added GlobalIDs, then added Guid fields to each table, e.g. Project table has ProjectGuid of type Guid.  I've created 1-to-many relationships between the tables based on the GlobalID -> Guid field of the related table.  Added all the tables to Arcmap, Shared as a service to AGO.  Gave it all the permissions when publishing, e.g. sync, edit, delete, etc.  In Survey123 Connect, create new survey from service I just published.  I made a couple minor changes in the label field, saved the excel XLSForm which updated the Survey then tried to publish and am getting an error: Parent layer id 11 not found for table T12_Construction_Contractor.  I've checked the service and don't see any differences between the fields in the .xls form and the published layer.  Thanks for any help! -Ray

12 Replies
ZacharySutherby
Esri Regular Contributor

Hello @raybricedev

 

From the error message it looks like Survey123 is having an issue identifying the parent layer related to the T12_Construction_Contractor table. 

Does that table happen to have multiple layers related to it or another tertiary layer or table related to it? 

 

If possible would I be able to obtain a copy of the File Geodatabase with the layers and tables for testing on my end? 

 

If you don't want to share it over Esri Community feel free to email it to my Esri email ZSutherby@esri.com. 

 

Thank you, 

Zach

Thank you,
Zach
0 Kudos
PatrickKent1
Occasional Contributor

I am experiencing the same issue. I have a GDB with multiple feature layers and related tables. I created 2 separate survey forms, each with their own target feature layer. But the two target feature layers are both related to a table that makes up many of the questions on the survey. I was able to publish one of the surveys but the other is showing the same error described above. The fact that one worked and the other did not is very confusing since they are virtually the same survey and share the same basic structure and related table. All of the fields in the survey match the table fields. Please post the solution if one has been found.

For context, I have set all relationships based on Global ID to GUID and have enabled attachments for all features and tables.

Thanks!

PatrickKent1
Occasional Contributor

I have found a workaround to the issue. I think it has to do with basing 2 surveys on 2 feature services that both share a related table. It seems to confuse AGOL when the surveys are published. I was forced to make a copy of the related table to that each feature service would have its own related table. That solution has worked successfully.

0 Kudos
KristinThorpe1
Regular Contributor

Hi @PatrickKent1 ! I know it's been awhile, but I'm working on an inspection survey with a similar schema to yours. I have a Site table (child) that is related to two separate layers, a Construction point feature (parent) and an Inspection table (parent) (The KEY fields are GUIDs). When I try and publish my survey, I get the error "Parent layer id 2 (Construction) not found for table Site". I'm wondering if your workaround will work if I copy the Site table. How did you copy your layer? Did it maintain the relationships? Do the two copies still talk to each other so if you edit one the other also updates? Any information will help! Thank you!

0 Kudos
PatrickKent1
Occasional Contributor

Hi Kristin, based on your diagram and description, copying the Sites table might work. It depends on the nature of the table. In my case the table I copied was really just a subset of questions that were not unique to either of the 2 parent features such as lat, long, repair status, ect. It looks like your Sites table might be the same but I am not sure. As long as there does not need to be one Sites dataset that is unique from the other tables.

To answer your question of whether it saves the relationships, the diagram of 2 parents sharing a related table will change. If you make a separate copy table and each parent only has one child then the relationships obviously will work differently. The copies do not talk to each other since they are not one dataset but rather a subset of fields that apply to both parents.

You can copy the table in Pro and just copy paste into the same GDB.

Hope this helps.

-Patrick

KellyArmstrong
Frequent Contributor

I am having the same issue.  I get:  "The custom feature service submission url is not compatible with this survey (Parent layer id 0 not found for table 'table_name')"

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @KellyArmstrong

 

If you navigate to the item details page of the feature service your survey is pointing to. At the bottom of the page there is a URL link, if you click the "view" button it will open the REST endpoint of the feature service in a new tab. On the page that it opens towards the top there will be a Layers section. Does the name of the layer with ID 0 match "table_name". 

If not you will need to update the value you have in the form_id column of the settings worksheet in the XLSForm to match the name of the layer from the REST endpoint. 

Thank you, 

Zach

Thank you,
Zach
0 Kudos
KellyArmstrong
Frequent Contributor

@ZacharySutherby ,

It doesn't, but that is because I am dealing with a related table, and its ID is 1.  In the form_id column, I have the related table name.

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @KellyArmstrong

If you're pointing the form_id to the related table you will also need to remove the begin and end repeat rows in the survey sheet. The only questions that should be in the survey sheet should be the questions that are in the table. 

Please refer to the first six steps of this Tech Support KB article for the workflow. 

Thank you, 

Zach

Thank you,
Zach