Related table editing Survey123

665
1
08-03-2020 03:11 AM
EmmaLewison1
New Contributor

I have been following this How to guide How To: Populate a related table from a Survey123 for ArcGIS feature service for Collector for ArcGI...  but I am getting stuck around step 7 with creating the read only field for the GUID linking. I have set up the field as a text, with the parent feature class' globalID field as the field name have made it read only but I am getting the following error when trying to publish. 

I am able to publish the survey if I skip this step and have the pop up working in collector. However I am then unable to send to the survey as I get the following error 

"This survey was not able to be sent due to the following error: the INSERT statement conflicted with the FOREIGN KEY constraint "REL_FK_QUARRY_INSPECTION_APPRASIAL_0". The conflict occured in database "db_142", table "user_142.QUARRY_INSPECTION_QUARRY" column 'GlobalID' The statement has been terminated"

I believe I require the GUID link in order to proceed but I am at a loss at what else I can do. Has anyone got any ideas?

1 Reply
ZacharySutherby
Esri Regular Contributor

Hello Emma Lewison‌, 

From the error message it looks like in the name column of the GUID field in the survey may have been set to GlobalID. If you navigate to the REST endpoint of the service you are trying to create the survey based on and select the table/layer (depending on what it is) it will show the list of fields. 

Copy the name of the esriFieldType GUID field and paste that in the name column of the XLSForm. 

For example in my test related table on the REST endpoint I can see the name of my GUID field is parentglobalid which I can then use as the name in my XLSForm: 

Thank you, 

Zach 

Thank you,
Zach
0 Kudos