updating itemsets.csv for new external choices // external_select questions

07-05-2018 12:09 PM
New Contributor II


The documentation is a bit thin with regards to external choices/external selects. I have a few questions that I'm hoping somebody could answer:

I understand that I should put the list_names/names/labels into a new tab called external_choices, and after publishing this creates itemsets.csv in the survey's media folder.

            1) After this has been created, can the values in itemsets.csv be modified/updated? Hoping to use external selects as a means updating these drop-down lists updated by exporting fresh CSVs from a SQL database

            2) If "yes" to the above - would updating itemsets.csv be sufficient, or would I also need to update the external_choices tab again?

            3) If "yes" to question number one above - I assume then that I would still need to re-publish the survey to "refresh" the select_one_external values?

            4) Can the data in itemsets.csv be used to supply choices for a select_multiple (select_multiple_external?)

Thank you

0 Kudos
4 Replies
New Contributor III

I have been testing updating itemsets.csv 'behind the scenes' (not by updating external_choices tab) and it appears it updates the choices available in the survey successfully.

However, if you update itemsets.csv, the external_choices tab in the xlsx will not update to match the changes to the csv file. Further to that, if you then go and save the xlsx, causing s123 connect to regenerate the web form, itemsets.csv will be regenerated from the contents of the external_choices tab, overwriting your updated csv file.

A solution is to download the survey form package, unzip it, overwrite itemsets.csv in the media folder, zip it back up, and then push it back up to AGOL / your portal without triggering a regeneration of the webform which would overwrite your freshly updated itemsets.csv file. This can be done via python, though I've found that documentation on doing something like this is minimal, which leaves a lot of trial and error.

Good luck!

Occasional Contributor III

Hi Kleinknecht, Jake 

take a look to this post for updating media folder of your Survey (CSV included) using Python script: https://community.esri.com/groups/survey123/blog/2017/12/08/an-alternative-way-to-update-the-media-f... 



0 Kudos
New Contributor II

OK - so this method (as of version 2.8.4) does not support external choices for multiple selects. Is there a plan for S123 to support external selects in select_multiple questions (select_multiple_external)?

Is there some combination of pulldata()/search()/external choices that would enable this?

I have select_multiple questions that I would like to be updated from reference tables in a database. The database could export a file (itemsets.csv) that has updated values for the select_multiple question to read from.

Right now, it seems the only automated way to do this would be using regular choices (not external), and doing something like this but instead of updating itemsets.csv you'd be updating the actual "choices" tab in the survey and re-publishing the survey. But this option, though possible, seems a bit scary since any errors could break the survey

Mentioning this to other folks who seem knowledgable on this topic based on geonet searches... Philip Wilson James Tedrick

0 Kudos
Esri Notable Contributor

Hi Jake,

External choices with cascading selects are only currently supported on select_one questions. We do not support external choices with select_multiple questions due to the M:M relationship and how this impacts. We do have an open enhancement for this feature, so i have updated with issue with your comments.

There is documentation on this here: Cascading and external selects—Survey123 for ArcGIS | ArcGIS and you can find more information in this blog post here: https://community.esri.com/groups/survey123/blog/2015/10/22/cascading-selects-and-external-selects

Given that using external choices for select_multiple questions is not supported, i do not believe there is a way to achieve the functionality you are after, as it would only apply to select_one question types and related itemsets.csv.


0 Kudos