Filter based on previous choices

Dear sir
I would like to know that how to write function for this (choice- filter). If the first question is selected anythings, I want to show not selected things on second question.
I know this function (selected(${Q1},name)....but this example is different function ...how to write sir

Example:

question A- The first kiddy do you love?
(a)cat
(b)dog
(c)snake
ans: cat
question B- The first kiddy do you love?
(b)dog
(c)snake
ans:dog

question c- The third kiddy do you love?
(c)snake
ans: snake

Thank a lot

Hi @khantaung
i think you need Cascading Select
I prepared an example form for you (it's your case):
new_cascading_select.xml (5.7 KB)
new_cascading_select.xls (9 KB)

Btw your case looks like ranking. Am I right? I'm asking because I've started working on ranking widget some time ago (it's not ready yet) please look here https://github.com/opendatakit/collect/issues/33#issuecomment-292934975
would it be helpful for you? Would you use such a widget? If so please add your comment it's needed.

4 Likes

Thank you very much sir..

Dear sir.,

I have many choice list sir , so I want to need short function for it. If you have any free time,please solution for it.
Thank you very much for your answer...

I doubt it's possible in other way... but maybe I'm wrong. What about my question? Do you try to order something (is a ranking)? Maybe the feature I was working on would be helpful?

Dear sir,
This is my required choice-filter function. Please you download attach file and check it.
Thank a lot sir...

choicefilter.xlsx (11.8 KB)

I've attached a brilliant example for you. Currently I'm a bit too busy to prepare entire file for you. I can do that when I'm free today evening maybe tomorrow if you find it too hard to build it on your own, analyzing my example.
But as I said my example is really good so it would be good for you If you try to understand it the you should be able to build another cs alone. it's not really complex.

PS. It would be great if you can answer my question about ranking widget :slight_smile:

1 Like