Survey123 Editing Data via Web - Delete Related Records

2483
9
11-04-2020 01:22 PM
by Anonymous User
Not applicable

Hello,

I have an application setup where users can edit data using Survey123 through the browser by using mode=edit and plugging in the globalid. There will be instances where users will need to delete related data. In the editing form there is a minus button which once clicked gives the appearances of deleting the repeat. However, after submitting and refreshing, the repeat is still there with all its data. Is deleting related records not possible using Survey123 in the edit mode via internet browser?

0 Kudos
9 Replies
Ruth_JiatengXu
Esri Contributor

Hi Nikholai,

Deleting the related records is supported by Survey123 edit mode. Could you please double-check the "what can submitters do?" on the collaborate page? If you didn't allow the submitters to delete the records, then the edit mode will return the error msg. If you have already enabled delete records and still see this error, please let me know, I will help you investigate further.

Thanks,

Ruth

0 Kudos
by Anonymous User
Not applicable

Submitters have all capabilities. See below image. The edit mode page has always loaded, no error has ever been given. When the edit Survey123 loads, the repeat is populated with it data. The only button is the minus button shown in the attachment to the original post. Clicking the minus button appears to delete the related record in the edit form, but after submission and going back to the edit form, the repeat with the data still exists. If this isn't clear, I can record a video to show you.

0 Kudos
by Anonymous User
Not applicable

After some more testing, I have found that I could not delete a related record if it would leave the parent record without any child records. However, if there were more than one related record, I could delete them given I still have at least one child record left. If I tried to delete all related records, the deletions would not be saved.

Is this intentional? 

DezsoLovicsek
New Contributor III

@Ruth_JiatengXu I am experiencing the same behaviour as described above by @Anonymous User. Being able to delete all the related records in edit mode would be quite helpful for my organization's workflows.

0 Kudos
Ruth_JiatengXu
Esri Contributor

Hi @Anonymous User @DezsoLovicsek 

The issue has been fixed in our 3.13 release, which is currently available on production. You could try the fix by appending your URL with &version=latest. Please let me know if you have any issue with the fix.

Thanks,

Ruth

MadelaineTaftFerguson
New Contributor II

If I understand correctly, you're saying that in 3.13, users CAN delete existing related records in edit mode via the browser? 

I have the same experience as the original post, in a survey published in 3.13: users have delete privileges, users can click the trash can icon and *appear to* delete related records, but in fact no change is made to the related record. There is no error message shown at any point.

Is this expected behavior?

0 Kudos
ThomasM
New Contributor III

I am having the exact same issue with a survey that is being edited through a dashboard. If deleting the related record would leave the parent feature with no child features, then the delete does not take. The survey form shows that it's deleted and lets me submit changes, but when I load records for that parent feature, the related record is still there. I do have "&version=latest" appended to the survey URL.

Additionally, when I went to the Survey123 site and attempted to delete the related record from there, it deleted my parent record as well, which is a very frustrating result.

GIS Specialist - MO Office of Geospatial Information
0 Kudos
by Anonymous User
Not applicable

One work around I found was to setup a Microsoft Power Automate flow on the Survey123 that would go and make a REST API call to delete the related records. Obviously not ideal, but it works.

VeronicaGore1
New Contributor

BUG-000146931: When editing existing records, ArcGIS Survey123 browser does not appear to be registering the modification of related records when none or only one of the repeats are modified - the repeat shows as (0) which makes it seem that there would be no submission, but when checking the feature layer, it shows that there was a submission created - has been logged for this issue.