Welcome to the LimeSurvey Community Forum

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

randomize following question's answers based on chosen in previous

  • Surveyteam7
  • Surveyteam7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162110 by Surveyteam7
Hello;

I have a question and I would be glad if someone can help me.

My problem is as below;

1st question I am asking the known brands.
2nd question only shows chosen brands however I want to randomize the answers each time.

the questions are as in the attached file. Can anyone show or replace the right conditions?

Thanks in advance for your kind help.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #162113 by tpartner
There is a question setting to randomize the answer order - manual.limesurvey.org/Question_type_-_Ar...r_.28random_order.29

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Surveyteam7
  • Surveyteam7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162124 by Surveyteam7
Hi Tony,

I talked with my colleague my apologies I forgot to add an important point on what we couldn't do.
The real problem is
Q1 question we are asking the known brands.
Q2 question only shows brands marked as in Q1 "I own it"/ "know it very well" and following 3 options..... BUT not to show the brand marked as "Never heard of it" in this answers options and we want to randomize the answers each time.

as an example you can see attached file.


I hope I could clarify. thank for you kind reply and help
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #162135 by tpartner
In that case, you would place relevance equations on the sub-questions of Q2 something like this:

Code:
!is_empty(Q1_SQ001) AND Q1_SQ001 != '1'



Sample survey attached:

File Attachment:

File Name: limesurvey...6688.lss
File Size:23 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago - 6 years 3 months ago #162136 by tpartner
...and a question relevance equation for Q2 could be:

Code:
(!is_empty(Q1_SQ001) AND Q1_SQ001 != '1') OR (!is_empty(Q1_SQ002) AND Q1_SQ002 != '1') OR (!is_empty(Q1_SQ003) AND Q1_SQ003 != '1') OR (!is_empty(Q1_SQ004) AND Q1_SQ004 != '1') OR (!is_empty(Q1_SQ005) AND Q1_SQ005 != '1')

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 3 months ago by tpartner.
The topic has been locked.
  • Surveyteam7
  • Surveyteam7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162145 by Surveyteam7
Thank you so much Tony.
The topic has been locked.
  • Surveyteam7
  • Surveyteam7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162163 by Surveyteam7
Hi Tony;

one final quick question how can we add a second condition we tried to use AND, OR inbetween below script but we couldn' t succeed.

relevance equations area

!is_empty(G1_SQ003) AND G1_SQ003 != '1' !is_empty(G1_SQ003) AND G1_SQ003 != '2' we wanted to add 2 as an additional condition.

Could you please tell how to add this.

Best Regards.
The topic has been locked.
More
6 years 3 months ago #162170 by jelo
Tony provided you everything you need. Take a look at his last post. There are additional ways of doing a relevance equation. But looking at the last post of Tony is a way of doing it. Just add additional answers via OR.

I can recommend this section of the manual: manual.limesurvey.org/Expression_Manager

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #162179 by tpartner
Code:
!is_empty(G1_SQ003) AND G1_SQ003 != '1' AND G1_SQ003 != '2'

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Surveyteam7
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose