I've been working through this procedure of updating the itemsets.csv files for published surveys. I have written a script that does this in Python 3 using the ArcGIS Python API. The script works great, but one issue I've noticed...
When cascading selects are setup, the first select_one list must appear in the 'choices' tab of the xslx form, right? And the subsequent contingent select_one lists can go in the 'external_choices' tab. (At least it yells at me when I remove the first list from the 'choices' tab)
Well the problem is that when I push an updated itemsets.csv to the survey that has different choices for the first select_one, those new choices appear but also the original choices remain. For example, if I published the survey with the first list question having Choice1, Choice2, Choice3, and then I run the script to update it and the newly updated first list question should be Choice2, Choice3, Choice4, what actually happens is the list has Choice1, Choice2, Choice3, Choice4 - which causes problems when you require the subsequent lists and selecting Choice1 means you get no choices for the second list.
I thought I might be able to get away just having the first list name in the 'choices' tab with no values, and the survey should pull the values from the itemsets.csv/external_choices but that does not work. I would hate to have to have a 'dummy' placeholder value in those! Anyone have a workaround to this?
Upon a bit more testing, it seems like updating the itemsets.csv in the media folder only updates the *contingent* picklist, that is the lists that depend on the first list in a cascading select. The first list values seem to ignore what's in the itemsets.csv and honor only what's in the 'choices' tab. This is problematic as we need a way of updating all 3 lists participating in our cascading select, not just the second two!