Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Hide answers from previous question

  • alexpatton
  • alexpatton's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #198401 by alexpatton
Hide answers from previous question was created by alexpatton
I have a List (radio) question.

q1. Please pick one as your first choice:
{sq001}red
{sq002}blue
{sq003}green
{sq004}undecided

'green' selected.

What I want to do is ask a follow up question - which would omit the selected answer from the previous question:

Q2. Please pick your second choice:
{sq001}red
{sq002}blue
{sq004}undecided

I can't seem to figure out how to do this. I have looked through the forums, attempted to use the logic exclusion Q1_sq001 or Q1{sq001}... neither seems to work.

any help deeply appreciated.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #198407 by Joffm
Replied by Joffm on topic Hide answers from previous question
Hi,

1. you should not code your answer options in a single punch question "sq001", "sq002".
This means "subquestions" and should be used in multiple questions, arrays, etc.

Now your question.
As you know you cannot use the array filters.

So you may insert a hidden multiple question (M1) and a hidden equation between these two questions.
All three questions have exactly the same answer resp. subquestion codes.
In the equation you set the selectd code of Q1 by
{M1_1=if(Q1==1,"Y","")}
{M1_2=if(Q1==2,"Y","")}
{M1_3=if(Q1==3,"Y","")}

with simple numeric codes
1: red
2: blue
3: green
4: undecided

Now you use this multiple question M1 as array exclusion filter for Q2.

Of course you have to decide what happens if the respondent answers undecided in Q1

File Attachment:

File Name: limesurvey...4-30.lss
File Size:28 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • alexpatton
  • alexpatton's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #198414 by alexpatton
Replied by alexpatton on topic Hide answers from previous question
Worked like a charm. Took me a few tries, but the example you included was key to my success.

Thank you!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose