https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-external-choice/ba...
https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-choice-filters/ba-...
How to create an external choice list
External choice lists are stored as CSV files. Unlike the choices worksheet in your XLSForm, which can contain multiple lists in a single worksheet, a CSV file can only contain one list. The rules to create the CSV file are:
The filename cannot contain spaces. The name of the file, becomes the name of your list.
You must include at least two columns: name and label (just like in the choices worksheet):
The name column includes the choice codes. No special characters, spaces or duplicates allowed.
The label will be used to present the choice to the user.
The CSV has no 'name' column. It won't work without a name column.
Not sure why there is a regex function in the choice filter column. It would return 'true' if the input was correct but I don't think it applies an actual filter?
I would recommend reading the blog post above. To achieve what you are after you would:
- Create a CSV with two columns - 'name' and 'label' - these are your tank options. Name is the value, label is what the user sees. Don't use special characters in the name column.
- Add a third column e.g. 'facility' that can act as your choice filter. e.g. tanks ABC, ABD, ABE can be allocated to X facility if the 'X' value matches the facility column.
- Add a choice filter to your select_multiple question: facility=${Fac_No}