Survey123 Failed to Submit Cannot edit layer '0'

472
4
08-11-2020 09:51 AM
JenniferHopkins
New Contributor III

I have a survey form created in Survey123 Connect embedded into an ArcGIS Dashboard. The survey is being used to update existing records in a feature service. The feature service is set to allow features to be updated (but not added/deleted) and the survey is shared with the necessary users.

I (the survey owner) can submit surveys without a problem. When others submit a survey, they get the below error, however the records are still updated with what was put into the survey, even though it says it failed to submit.

Any ideas on what might be causing this to happen?

0 Kudos
4 Replies
Ruth_JiatengXu
Esri Contributor

Hi Jennifer,

Thank you for sharing your question here! I tried myself, but I was not able to reproduce the issue, unfortunately. Could you please provide more info on the settings and steps so that we can identify the problem? The answer to the following question would be helpful. What is set for "What kind of editing is allowed"? What is set in the Survey123 to collaborate share survey, and share result pages? Whether the "others submit a survey" to update data or to add data?

Here are the settings and steps that I was used:

(1) On the Survey123 collaborate page: Set "who can view" and "who can submit" to a specific group, and left the "what can submitters do" unchecked. 

(2) On the AGOL feature service settings page: I checked only update under "what kind of editing is allowed".

(3) Switch to another account in org, I tried to add data using the Survey123 web app without mode=edit -> the error msg you comment above appeared, but no data was added to the feature layer.

(4) I tried to update data using Survey123 web app with mode=edit and global id -> update without error msg

Thanks,

Ruth

0 Kudos
JenniferHopkins
New Contributor III

Hi Ruth,

The feature service on which the survey is built allows for editing by "updating attributes only"

The survey is set the same way that you mentioned; in the collaborate (share survey) tab, who can view/submit is set to a specific group, and "what can submitters do" is unchecked. In the collaborate (share results) tab, who can view results of the survey is left unchecked.

I am also using mode=edit and globalID=Global ID. One other thing to note is that the feature service consists of one points layer, and five related tables. This specific survey is updating attributes in one of the related tables, but nothing in the parent feature layer. I believe that the error "Cannot edit layer '0'" refers to that parent feature layer, as when I download the feature service to a file gdbase, the parent feature layer is named 0 and each subsequent related table is named a value 1-5.

Thank you! 

0 Kudos
JenniferHopkins
New Contributor III

Hi Ruth, I haven't been able to resolve this issue. Do you have any other ideas on what I could try? Thanks!

0 Kudos
Ruth_JiatengXu
Esri Contributor

Hi Jennifer,

I am so sorry that I missed your reply. I think editing the related table may cause the issue you encountered. I have created a survey with two repeats and another survey reference to the first repeat.

With the settings mentioned above, I use the ?mode=edit&globalId=0b6bf520-8090-4b46-8952-c2c57f90782c (highlight in the screenshot below), then the survey can be loaded without error. However, if I use the parent global ID of the main layer, the error raised in the app.

Another thing you could check is the form_id in the settings tab of your XLSForm, since if you are editing the related table, the error should be "can not edit layer '1-5'" instead of "can not edit layer '0'". Here are the settings I have, I put the repeatName as the form_id.

Hope this is helpful, I will keep my eye on your post closely. If you have any other issues, please feel free to reply. I will try to get back to you ASAP.

Thanks,

Ruth

0 Kudos