How to not Filter out Other Specify

Hello Guys. I am try to implement a logic such that answer choices which are not selected in the previous question will appear in the next question.

Like for example

Q1. What is your main occupation?

  1. Own farm
  2. Own Business
  3. Farm work for others
    4 Other Specify

Q2. What are your other sources of income?

  1. Own farm
  2. Own Business
  3. Farm work for others
    4 Other Specify

I have used @optioncode!=q1 && **@optioncode!=q1(4) but its not working. Kindly help

@optioncode!=q1 && **@optioncode=q1(4)
Sorry this is the code.

Hello @simon_mbai

In the filter of the question q2 (I’m not sure if this is the name of your second question) you only should have:
@optioncode != q1
This works only if your question one and question two are questions of type single selection.

It tried it and it worked on both single select and Multiple select but then the other specify answer choice should not be filtered out even if it is chosen in the previous answer choice.

Try with this:
Q1 != 5 ? @optioncode != Q1 : true
Where 5 is the code of the option Other

@kv700032 likely meant Q1 instead of Q2.

Still, simplify:

@optioncode!=Q1 || @optioncode==5

In English: show option with code 5 (other) always, other options only if they are not the selection in the first question.

You may also find the section β€œTourism seasons” in the following questionnaire useful:
https://designer.mysurvey.solutions/questionnaire/details/04b421596f0443e88cd99ec0538d89ff/chapter/bf255e3fe34f3162851adaa28707133c/group/bf255e3fe34f3162851adaa28707133c

Best, Sergiy Radyakin

1 Like

Sorry.
He’s right, it was Q1. I have corrected the publication.

Thanks @kv700032. It has worked.

Thanks @sergiy. It has worked.

How can I filter answer responses from t multiple response questions such that only those answers selected appear in the next multiple response question.

please see below;

D1. Which seed companies do you know?
1.A
2.B
3.C
4.D
D2. Apart from the ones mentioned, which of these other seed companies have you ever heard of?
1.A
2.B
3.C
4.D
D3. Which seed companies have you bought seed from?(Only those answers selected in D1 & D2 should be visible in D3.

I am currently using the following code and it is not working;
(IsAnswered(D1) && D1.Contains(@optioncode)) &&
(Answered(D2) && D2.Contains(@optioncode))

  1. There is no function Answered(). There is a function IsAnswered().

  2. Assuming the above is corrected it should show in Q3 the selections made SIMULTANEOUSLY in Q1 and Q2. This agrees with common selections A, B, C, D in both questions. But contradicts the formulation of the second question. Most likely you will need the || operator between the two major parts of your expression, not the &&.

Regards, Sergiy

Hi Sergiy,

Many thanks! It has worked well.