Choice filter on specific option selection

1. What is the problem? Be very detailed.
I have a question with 10 statement with select_one option 1 to 5
second question is top 3 ranking

Statement A 1 2 3 4 5
Statement B 1 2 3 4 5
Statement C 1 2 3 4 5
Statement D 1 2 3 4 5
Statement E 1 2 3 4 5
Statement F 1 2 3 4 5
Statement G 1 2 3 4 5
Statement H 1 2 3 4 5
Statement I 1 2 3 4 5
Statement J 1 2 3 4 5

if i select option 4 or 5 in any statment then this statment should shown as option in next question. i.e i select 4/5 in statement A, B, E, J

then these statement should be shown as option in next question for ranking

how could i achieve this...

2. What app or server are you using and on what device and operating system? Include version numbers.

ODK Aggregate, ODK Collect

3. What you have you tried to fix the problem?

4. What steps can we take to reproduce the problem?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Hello @noman.s2325 ,

Not sure if it's just me... but i find the illustration of the problem hard to understanding. i.e.: ranking would use select_multple instead of select_one, etc...

It would more helpful if you share a draft of your xlsform for a better understanding of the questions layout, and only then one might be able to best guide how the filters can be established

Jules R


Try something like this:

  • Have a calculate field that contains all statements where 4 or 5 have been selected. You could use a formula like:

      if(${StatementA} >= 4, "StatementA", ""),
      if(${StatementB} >= 4, "StatementB", ""),

    That calculate field will contain a pipe-separated list of all applicable answers, for example it could be StatementA||||||StatementG|||StatementJ.

  • In your top 3 ranking question, use a choice_filter that says something like:

    contains(${ApplicableAnswers}, name)

You could use three separate questions for the top 3 (first choice, second choice, third choice), and have a validation that checks whether they are different. And a relevant clause that hides a question if a user selected fewer than one/two/three values.

I haven't tested this answer, but I hope it will be enough to get you started.