Series of linked questions

Hi,
I need to ask a series of linked questions. What's the best way?
I'm new to this and don't want to create a screen for each question.
Can anyone help me?

Example:

Question 1 YES/NO
If YES, then Question 2
If NO, then Question 3

Question 2 YES/NO
If YES, then Question 4
If NO, then Question 5

Question 3 YES/NO
If YES, then Question 6
If NO, then Question 7

Question 4 YES/NO
If YES, then Question 8
If NO, then Question 9

Question 5 YES/NO
If YES, then Question 10
If NO, then Question 11

Question 6 YES/NO
If YES, then Question 12
If NO, then Question 13

Question 7 YES/NO
If YES, then Question 14
If NO, then Question 15

Question 8 YES/NO
If YES, then Result 1
If NO, then Result 2

Question 9 YES/NO
If YES, then Result 3
If NO, then Result 4

Question 10 YES/NO
If YES, then Result 5
If NO, then Result 6

Question 11 YES/NO
If YES, then Result 7
If NO, then Result 8

Question 12 YES/NO
If YES, then Result 9
If NO, then Result 10

Question 13 YES/NO
If YES, then Result 11
If NO, then Result 12

Question 14 YES/NO
If YES, then Result 13
If NO, then Result 14

Question 15 YES/NO
If YES, then Result 15
If NO, then Result 16

The content changes from Question to Result halfway through your list, did you mean for that to be the case, or should we "replace" Result with Question from Question 8 onwards ?

From Question 8 show result and not another question

If question 1 is YES
then go to question 2

If question 2 is NO
then go to question 5

If question 5 is YES
then go to question 10

If question 10 is YES
show result 5

The data structure in this app is similar to what you need.

Also see

Here is a sqlite solution
Create a table with the following columns: question number, question text, question number yes, question number no
1, question text 1, 2, 3
2, question text 2, 4, 5
etc
Then use a select statement to find out the next question number depending on the answer

Example question 1:
if answer of question 1 was yes
Then Next question number = Select question number yes from myTable where question number = 1
Else Next question number = Select question number no from myTable where question number = 1

Taifun

1 Like