Select to view content in your preferred language

Survey123 - Is it possible to populate a select_one list from answers to a text question?

4149
10
09-18-2019 06:29 AM
by Anonymous User
Not applicable

Is it possible to populate a list of select_one values from answers to a question?  I am creating a survey where new sites are added in a text field answer.  What I need is these new sites to be added to a list once the survey is uploaded for subsequent surveyors to have access to and save on effort and duplication.  I can't see how i would do this at the moment.  #survey123 #select_one #autopopulate

Tags (1)
0 Kudos
10 Replies
MichaelBruening
Occasional Contributor

@Anonymous Userhave you looked into the BETA testing or Early Adopters group for Survey123? If not, then you should sign up for it and take a look at the "Linked Content" documentation. This is a process where you can post a CSV file into your ArcGIS Online Organization and then in turn link it back to a survey. Within the survey you can then reference this CSV file as a question type of "select_one_from_file filename.csv" or "select_multiple_from_file filename.csv"(please note the space between file and filename.csv) and this question will use the uploaded file as a list of choices.

I was able to figure out a way to in turn use answers from a different survey as choices in other surveys by exporting the data from the survey to FGDB table, convert this into the correctly formatted and sorted csv file, and then upload the updated CSV file back into my ArcGIS Online account to "Update" it all through a model builder within ArcGIS Pro. I have in turn scheduled the model builder to run at certain intervals throughout the day to rerun my model which in turn updates the CSV file regularly with newer submissions to the first survey all to be used within the second survey as choices to a question.

The great thing is the field app will check the version of the csv file on the device against the version on your ArcGIS Online account via the timestamp. If they are different, then the field app will download the new one from ArcGIS Online and use within your survey.

There is a catch though and I think they are working on a solution for this. I noticed that upon submitting the data that was using the "select_from_file filename.csv" was not populating answers within my Custom Reports. My work around was to use the "select_from_file filename.csv" as a temporary question in conjunction with a second question that uses a calculation that equals the temporary "select_one_from_file filename.csv" question. This in turn will store the answer permanently and be used within my custom reports.

If you do not want to attempt setting up an automated process, then you can always export the survey that contains the answers you want to use into a csv file, then you would trim down this file to have two columns named "name" and "label" (exactly like this case-sensitive). Then you would go onto your CSV details page within your ArcGIS Online account and use the "Update" function on the right-had side of that page to upload the CSV file you just created.

Good Luck!

0 Kudos