A mistake was made and a survey was deleted in Survey123 connect. Unfortunately the survey is out in the field on numerous devices and it would be very tedious/ impractical to manually recover the SQLite from each one.
The good news is the survey used a submission URL, and the AGOL feature layer is still intact. A restore has put the XLS form back into Connect, the survey itself is intact and visible as it was.
The bad news is when I tried to republish the survey from Connect it made a new survey and the field devices still can't send data from their outbox (Item not found error). Clearly, the survey on the field devices are looking for something that doesn't exist, the error log says :
Feature service error: {
"code": 400,
"details": [],
"message": "Item does not exist or is inaccessible.",
"messageCode": "CONT_0001"}
Is it possible to reconnect the pieces so the field devices can send again? How would I approach that task?
Solved! Go to Solution.
Hi @PhilHickey_ntg,
Unfortunately not. The itemid of the original form item created is what is stored and used in the surveys downloaded on the devices (in both the sqlite database and the survey files). If you create a new survey from Connect it will have a different itemid that does not match the original on the device. There is no easy way change this on the device.
The best option would be to copy the sqlite database off each device, download the new survey to a desktop, modify the sqlite contents to point to the new survey on that desktop, and if the schema and all other survey aspects are the same, you should be able to submit. This may or may not work depending on the coniguration of the survey and sqlite database and if you can make it think they are the same.
Regards,
Phil.
Hi @PhilHickey_ntg,
Unfortunately not. The itemid of the original form item created is what is stored and used in the surveys downloaded on the devices (in both the sqlite database and the survey files). If you create a new survey from Connect it will have a different itemid that does not match the original on the device. There is no easy way change this on the device.
The best option would be to copy the sqlite database off each device, download the new survey to a desktop, modify the sqlite contents to point to the new survey on that desktop, and if the schema and all other survey aspects are the same, you should be able to submit. This may or may not work depending on the coniguration of the survey and sqlite database and if you can make it think they are the same.
Regards,
Phil.
Thank you for the explanation. If I understand the explanation correctly, the survey is deeply embedded with the ItemID of the original survey. As the original itemID is known, the new question becomes is it possible change the ItemID of the form made by the recreated survey back to the original survey ItemID.
Making a little tool with ArcGIS Runtime SDK for .NET to directly set the ItemID property could do the job if it were permitted. Given the survey is broken, is there any downside to trying?
Hi @PhilHickey_ntg,
I do not believe this is possible. Every item created in ArcGIS has a unique identifier (the itemID). I don't believe this can be set manually, or udpated for an item, and it will always be unique across all items in ArcGIS (similar to how a GlobalID works).
That is my understanding of it, but if you want further clarification, it may be worth posting in the ArcGIS Online forum or reaching out to Esri Support, to see if there is anything else that can be done from an itemID point of view.
Regards,
Phil.