Select to view content in your preferred language

select multiple from file issue with choice filters

168
3
a week ago
brandondurr
New Contributor

Hi,

I can't seem to get choice filters to work on a multi select survey field that is linked to an external csv.

I've attempted a couple different syntaxes:  =${      } and  select() 

When I apply the choice filter to the multi select field, the list options disappear from the survey.

I am currently running Survey123 Connect 3.22.44, and havent had luck with solutions proposed in similar threads. Any ideas?

Here is what my data looks like

XLSForm

typenamelabelappearancechoice_filter
select_one_from_file manager.csvmanagerManagerautocomplete 
select_one_from_file vyds.csvvineyardVineyardautocompletemanager=${manager}
select_multiple_from_file sblocks.csvvineyard_blockVineyard Blockminimalvineyard=${vineyard}

 

manager.csv

namelabel
manager1manager1
manager2manager2
manager3manager3

 

vyds.csv (file has 150 records)

namelabelmanager
farm1farm1manager1
farm2farm2manager2
farm3farm3manager2
farm4farm4manager3

 

sblocks.csv (file has 3K records)

namelabelvineyard
1field1farm1
2field2farm1
3field3farm1
4field1farm2
5field2farm2
6field3farm2
7field4farm2
8field1farm3
9field2farm3
10field1farm4
0 Kudos
3 Replies
abureaux
MVP Frequent Contributor

I recreated your survey, and I don't see the problem.

From the above, I have this for the survey:

abureaux_1-1750705029519.png

Plus 3 CSVs:

abureaux_2-1750705044243.png

In my test, it seemed to work as expected:

abureaux_3-1750705064139.png

Is this what you see? If not, what do you see and what do you want to see?

EDIT: I attached all the documents.

0 Kudos
brandondurr
New Contributor

so its odd. your screen shot is what i expect to see. when i download your attached files, everything works (this wasn't the case using files i attached).

brandondurr_0-1750797959682.png

The initial data i provided was generic. If i update the labels and filter on column in each of your files (and mine), using my company's actual farm data the filters stop working. 

brandondurr_1-1750798300430.png

manager file:

brandondurr_2-1750798342364.png

vyds file

brandondurr_3-1750798366794.png

sblocks file

brandondurr_4-1750798674769.png

brandondurr_5-1750798687703.png

 

 

0 Kudos
abureaux
MVP Frequent Contributor

In that case, the issue is most likely with the full CSVs. There is probably something going on in the file that is breaking your workflow. 

From the S123 side of things, your workflow should work (which is good).

As for the CSVs, I see you have "name" and "label" columns already (which is good). But as for further troubleshooting, it's hard without actually seeing the files. If they aren't confidential, then adding them here would help. 

The few bits of advice I can give are (in no particular order):

  • Re-save the file as a CSV. Sometimes CSV files have an issue saving which prevents them from working in S123, but still allows them to be opened in Excel. Doesn't happen often, but I've had it happen a few times.
  • Ensure there are no empty rows.
  • Ensure there are no special characters in the name column (same general rules as the "name" column in the S123 Excel files). Personally, I stick to alphanumeric characters and underscores. Leave the fancy stuff to the label fields. 
  • Cut out all but a few lines from the files and try.
0 Kudos