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

**URL:** <https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232>\
**Category:** Support\
**Tags:** form-design\
**Created:** [January 27, 2023, 5:40pm UTC](https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232 "2023-01-27T17:40:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alain\_Benard](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/alain_benard/32/17958_2.png) [@Alain\_Benard](https://forum.getodk.org/u/Alain_Benard)\
**Post date:** [January 27, 2023, 5:40pm UTC](https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232/1 "2023-01-27T17:40:17Z")

</div>

**1. What is the issue? Please be detailed.**  
[fruits.csv](https://forum.getodk.org/uploads/short-url/rd4NX7jEMIzYhC0n0XmCODxqJ67.csv) (323 Bytes)  
[fruits.xlsx](https://forum.getodk.org/uploads/short-url/y81lEwdprXECMT8yImlXTCW1kx3.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

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [January 30, 2023, 2:18am UTC](https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232/2 "2023-01-30T02:18:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alain\_Benard](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/alain_benard/32/17958_2.png) [@Alain\_Benard](https://forum.getodk.org/u/Alain_Benard)\
**Post date:** [February 1, 2023, 3:51pm UTC](https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232/3 "2023-02-01T15:51:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [February 1, 2023, 11:25pm UTC](https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232/4 "2023-02-01T23:25:50Z")

</div>

Take a look at the second example in the form I linked from [Avoiding duplicate selection in repeat group - #22 by LN](https://forum.getodk.org/t/avoiding-duplicate-selection-in-repeat-group/9900/22). You can use `select_one_from_file` exactly the same way as the internal select shown there.

---

<div class="post-metadata">

**Author:** ![Alain\_Benard](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/alain_benard/32/17958_2.png) [@Alain\_Benard](https://forum.getodk.org/u/Alain_Benard)\
**Post date:** [February 2, 2023, 4:36pm UTC](https://forum.getodk.org/t/select-in-repeat-should-only-show-choices-that-havent-been-selected-yet/40232/5 "2023-02-02T16:36:52Z")

</div>

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.
