Export data results in choice0, choice1, choice2 values in CSV

3986
13
12-13-2016 03:00 PM
KatjaKrivoruchko
New Contributor III

I have created a survey using Survey123 Web, submitted a couple of test forms, and exported the data to CSV. In the output, I see values like choice0, choice2, choice4, etc. instead of the actual choices as in the form. For example, for "Are you living in a vehicle?" question, the possible answer are Yes or No. However, I am seeing answer "choice0" and "choice2" in the output. Same for "Length of Current Homelessness" question - "choice0" instead of actual options from the form.

Is this a known issue? How do I get actual values to show up? The Analyze tab on the website shows actual values, so I know the data is there...

13 Replies
IsmaelChivite
Esri Notable Contributor

Hi Katja. If you would like to control the exact field names and domain coded values you will need to use  Survey123 Connect. You can take an existing survey authored  on the web and download it into Connect, where you can overwrite the field names and choice values.

Although it would seem like we could easily use the user-provided labels for fields and choices to create  field names and coded value domains, the reality is that we cannot, because user-provided  labels can include non-ASCII characters that would not be acceptable as field names or in the XLSForm specification.

The use of choice_0, choice_1 etc values  is obvious  when you download as CSV format or Shapefile. If you download the data as  FileGeodatabase you will see descriptions and field  aliases used in ArcGIS Desktop rather  than the actual values.

RyanClark9
New Contributor II

Ismael,

Thank you for posting this. I had a similar issue as Katja and tried manually changing the field names and code values in Survey123 Connect. This fixed the problem.

0 Kudos
by Anonymous User
Not applicable

If I change the names from Choice0, Choice1,.. to the actual name, when I republish, will I lose the data that has already been inputted?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi,

The previous values will remain in forms already submitted. From the Survey123 website, you can't modify the previously created choices names (you can change the labels.  You can do this with Survey123 Connect, though you would likely need to update the table to reflect the changes .  

0 Kudos
by Anonymous User
Not applicable

What I am hoping to accomplish is showing the Labels not the choices, this is what it currently looks like

Scott Jones

Assistant Chief - Special Operations

Shasta-Trinty Unit CALFIRE

Cell – 530-448-2406

Work 530-225-2406

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Scott, 

There are a few constraints on the renaming you are doing.  According to the XLSForm specification, choice names should not have spaces and be under 32 characters.  While it's possible to publish a form with names such as you are using, you will likely get warnings.  A second concern would be to check what the length of the existing field is; what you are creating is significantly longer the previous values; if the text is longer than the length of the field, the data will not be able to submit successfully.  A better practice would be to have a more meaningful, but still shorter, abbreviation code in place of the full label.

Can I ask how the data download is being used?  Is there an alternative approach using another application that can take advantage either of the service directly or the fileGDB download if the full label needs to be visible?

0 Kudos
by Anonymous User
Not applicable

Trying to gather data from my Prevention Officers, this list was created by our Region Office. I could shorten the names for sure, and leave the label as is. Right now they are using Survey 123. The idea is as they go about their shift, they note on their phone or tablet what activity they are performing. Or when they get back to the office, drop the pin for the initial action. Since most of their activity involves post investigation we expect their to be quite a few pins at HQ but we can query the INC number to get rough estimate of time.

I am just worried if I re-publish I will lose the data already collected? Or the names will delete for the ones that have already been inputted.

Scott Jones

Assistant Chief - Special Operations

Shasta-Trinty Unit CALFIRE

Cell – 530-448-2406

Work 530-225-2406

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Scott,

If you are only changing the values in lists, data will not be deleted.  That being said, for the new values to be usable in some other applications, you will need to update the domain of the field where the data is being stored - see https://www.esri.com/arcgis-blog/wp-content/uploads/2014/10/How-to-Update-Hosted-Feature-Service-Sch... for instructions on doing that.  I would suggest just adding the new values to the domain, that way both he old & new values are valid.

0 Kudos
deleted-user-ROabVzfY3erf
New Contributor II

Hi Katja,

I have found an easy way to get all the records with all values from the survey just by expanding the table in Data Tab. Select all fields including all headings then paste in Excel and you'll get all records with the values from your survey.