Survey123 / Select_One / Pulldata / CSV

933
7
02-20-2020 08:31 PM
CraigPoynter
Occasional Contributor III

Hi,

I have a list of town names that are associated with a number of regions. Currently the list of towns is around 400 but may grow above more than 2000, so will become problematic in 'choices' tab. I have the towns and regions in a CSV file. What I would like to be able to do is use the CSV to populate a Select_One list with Autocomplete functionality to speed up town name searching.

From reading, I have seen mention of external_selects, but they require a choice filter first. Users of the form do not know region names to be able to filter towns and no other additional information is available apart from these two fields.

Is it possible to use a CSV to populate my select_one list?

0 Kudos
7 Replies
Alber_Verster
Esri Contributor

Hi Craig,

Unfortunately not. The only way to update your choice list is to update the list manually and republish the survey.

Having over 2000 items in you choice list is obviously not ideal as it may cause performance issues in the survey form.

0 Kudos
Jing_Sun
Esri Contributor

Hi Craig,

If you simply want to have a select_one_external question but do not want a cascading selects, you can just add a hidden question before the select_one_external question. 

The string you input into the hidden question's 'default' column can then be used as the answer of a previous question. This way the cascading selects is not required to utilise the external choices.

Something like this:

Cheers,

Sun

0 Kudos
CraigPoynter
Occasional Contributor III

Hi Sun,

Not sure I am configuring my XLS form correctly. I have attached it. When I load this in Connect, I am unable to enter text in the 'Town' question to check against/search the external list.

Regards,

Craig

0 Kudos
Jing_Sun
Esri Contributor

Hi Craig,

What we are trying to do is simply a cascading selects without actually having the first question. It essentially is a very similar method described by Doug, and the 'field' he mentioned is the hidden question I described above.

In this example, add a column 'column_1' (the name could be anything you want) to both 'choices' and 'external_choices' worksheets, fill this column with 'A' (your dummy value) in the 'external_choices' worksheet and do nothing to the 'choices' worksheet. 

Then change the expression in your choice filter to column_1=${hidden_question}. 

It means: for this question, look for the choices in the external_choices list with value 'A' in the 'column_1' column.  

That being said, if you only have one list (either region or town) in the external_choices worksheet, you don't need to do anything I describe in this reply, simply delete the hidden question and change the expression in the choice filter to something like 1=1, this will load all the values in the external_choices worksheet - but this doesn't improve the performance.

Cheers,

Sun

0 Kudos
DougBrowning
MVP Frequent Contributor

You can just add a lookup column with a dummy value like Y.  Then have your choice filter just by = Y.  This way you get the whole list every time.  Only trick is it seems you must put the Y in a field then use the field in the filter vs text.

0 Kudos
CraigPoynter
Occasional Contributor III

Hi Doug,

Can you supply an image example of your method please.

Regards,

Craig

0 Kudos
DougBrowning
MVP Frequent Contributor

Create dummy fields to hold the text

Use these in you choice filter

Foliar=${fulllist} or Type=${none}

Have a column in external_choices that has the text from the fields

In this case fulllist is set to 'Y' then I give every item in the list Y.  So it is not actually filtering anything, it just gives me the full list, but I still get all the speed benefits of using an external list.

Hope that helps.

0 Kudos