Extracting Survey123 data from Device

6825
12
07-24-2017 09:34 AM
by Anonymous User
Not applicable

Some staff have been collecting data using an old version of a survey that points to a feature service that no longer exists. The data is stored in their sent/outbox folders. Is there anyway of extracting that data without having to manually write it down?

Tags (2)
0 Kudos
12 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Nikholai,

We are working on some tools to automate the extraction of survey data as a data recovery workflow.  I've attached a fairly basic python script that will create CSV files based on the survey data collected. 

0 Kudos
YigalMuntner
New Contributor III

Hello James,

Is it possible to extract photos from the Survey123 SQLite database?

Yigal

0 Kudos
TL2
by
Occasional Contributor III

I believe those are not stored in the database, they can be found in the My Survey Attachments folder on your device.  ...\username\arcgis\My Survey Attachments

0 Kudos
SarahSiddiqui
New Contributor

Hello James, 

I'm running the script but keep receiving the following error:

inDB = sys.argv[1]
IndexError: list index out of range

I've tried debugging and cannot understand the issue, I would appreciate help.

0 Kudos
PaulG
by
New Contributor II

Hi @JamesTedrick , I would like to utilize this script to extract data> I have copied the "my surveys" folder onto windows but I don't know how to point to the database and also to specify the output csv file.

Kindly advise how I parse-in the database and the output directories. 

 

Thanks, 

0 Kudos
AdrianHughes3
Occasional Contributor

We have a user with this issue. Have these tools been developed further? How would we go abut running the python on the phone, just from a  command line?

Thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Adrian,

We are planning to improve the tools available, but don't have anything released quite yet.  You will need to copy the 'My Surveys' folder from the phone to a computer - iOS does not allow a script to run on a phone, and while it may be possible to run python on Android (I haven't looked deeply into that, but it's likely a developer has done it), the script above was not designed for any hiccups a python implementation on a phone might have.  See Troubleshoot—Survey123 for ArcGIS | ArcGIS for information on transferring the data.

0 Kudos
SethPaine1
New Contributor III

I created a script to export a Survey123 SQLite database to a file geodatabase:

arcpy - Importing Survey123 SQLite Database from Device - Geographic Information Systems Stack Excha... 

TL2
by
Occasional Contributor III
arcpy.AddField_management(fcPath, str(tier2key), "TEXT")

File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 3424, in AddField raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000012: OBJECTID already exists Failed to execute (AddField).

I set up the SQLiteDB input as a File and the Output location as a folder.

Any advice?

0 Kudos