Select in repeat should only show choices that haven't been selected yet

1. What is the issue? Please be detailed.
fruits.csv (323 Bytes)
fruits.xlsx (12.1 KB)

In a form I have a repeat loop with 2 fields 1) a list that must be fed from an external file and 2) a free text field. I would like at each iteration the content of the list to adapt so that it no longer offers the elements that have already been selected during the other iterations. My actual case is not about fruit but I think the illustration will capture the problem. In my excel file there is a test in the choice-filter column but it has no effect. I have seen so many different proposals, sometimes based on intermediate variables with different syntax without any success. Thank you for your help and especially I don't want to put my fruits in the choice tab of the excel file. I place the 2 files (xlsx and csv) as attachments.

2. What steps can we take to reproduce this issue?
You have the file

EDIT: I must have read the post wrong. Removing my answer because it doesn't match the question.

Hi thanks for your response but

  1. I don't need select multiple

  2. if my need can be covered with something other than choice filter that's ok for me.

My need is very simple not? A list from a csv file wich adapt at each iteration (simple choice)

Thanks for advance.

Take a look at the second example in the form I linked from Avoiding duplicate selection in repeat group - #22 by LN. You can use select_one_from_file exactly the same way as the internal select shown there.

2 Likes

Thank you LN. It's just what I need. This solution is ok with simple list (sheet choice) or select_one_from_file. The form can be on enketo or odk collect.
I had tested with a calculation (just one variable) join(', ',${fruit_choisi}) but it's work on odk collect but not on enketo.

1 Like