Exclude elements of a list in a repeat (avoid asking the questions if the choice in the list is "other")

Hi all

In my form I have 2 questions. Q1 is a list, Q2 is within a repeat, meaning that for each elements ticked in Q1, Q2 will appear.
Q1 (select multiple): which crops do you grow (Answers are: wheat, rice, corn, vegetable, other) ?

Q2 (decimal) What is the yield of ${Q1}

Q2 can then be the following :

  • List item

  • "What is the yield of corn",

  • What is the yield of wheat",

  • "What is the yield of rice ",

  • "What is the yield of other "

How can I prevent the form to show "What is the yield of other"?

3. What have you tried to fix the issue?
I tried to put not(selected(${q1},"other")) in the relevant column but whenever "other" is ticked (in addition or not to rice/corn/wheat), no questions are be displayed

I also tried if(selected(${q1},"other"), "0", count-selected(${q1_1_1})), in "repeat count" column did not work either. Same reason

Finally I tried to put not(selected(${q1},"other")) in the choice_filter column with no effects.

How can I display the Q2 for the corn, the rice and the wheat, using a repeat, but not for "other" ?

Thank you

Hi @pol-91

Welcome to the ODK forum. We're glad you're here. When you get a chance, please introduce yourself on this forum thread. I'd also encourage you to add a picture as your avatar because it helps build community!

What about something like this:
TestForm.xlsx (6.8 KB)
Does that work for you?