Welcome to the LimeSurvey Community Forum

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

Unsure on the type of condition/how to set it up conditions

  • zara.szigeti
  • zara.szigeti's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago - 3 years 4 months ago #223026 by zara.szigeti
Please help us help you and fill where relevant:
Your LimeSurvey version: 2.73.1
Own server or LimeSurvey hosting:
Theme: Conditions

==================
I'm creating a survey focused on COVIC recovery and I have a question where I ask people if they've been vaccinated against COVID-19, how many doses they've received, the date of vaccination, and the brand of vaccination. I would like the survey to flow as follows:
Q1: Have you been vaccinated against COVID-19? Answers: Yes/No
Q2: If participants answer yes to Q1, then: How many doses of the COVID-19 vaccine have you received? Answers: 1/2/3
Q3: If participants answer 1 to Q2: Which brand of the vaccine did you receive for your first dose and what date did you receive it?
Q4: If participants answer 2 to Q2: Q3+ Which brand of the vaccine did you receieve for your second dose and what date did you receieve it?
Q5: If participants answered 3 to Q2: Q4 + which brand of the vaccine did you receieve for your third dose and what date did you receieve it?

How can I make this conditional statement? Essentially, I would like Q3 to  appear if participants ONLY reported one dose (i.e. answered 1 to Q2). I would like Q4 to appear if participants reported 2 doses (i.e. answered 2 to Q2), and I would like Q5 to appear for those who received all 3 doses.The issue appears to be when considering that these doses build on top of one another. For example, if participants answered that they received 3 doses to Q2, they inheritely received doses 1 and 2. I would like the options to report dose brand/date for doses 1 AND 2 AND 3 inclusively.

My issue if that LimeSurvey inherently makes these "or" statements. Meaning that if participants answered that they received 2 doses to Q2, they seem to be only be able to report the date/brand of  the second dose. However, I'd like them to be prompted with Q3 AND Q4 (i.e. what is the name of dose 1? dose 2? dates of dose 1 and 2?) I've tried playing around with the quals, less than or equal to options and can't seem to figure it out. 
 
Last edit: 3 years 4 months ago by zara.szigeti.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #223028 by Joffm
Hi, 
why  don't you attach a LSS export of this part of your survey?
It is easier for us to understand your question, we do not have to create a sample survey, and easier for you as well (you see the solution)
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • zara.szigeti
  • zara.szigeti's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago - 3 years 4 months ago #223029 by zara.szigeti
Hi Joffm, I've tried removing some of the conditions but please see below a copy of LSS export:

[EDIT] Deleted the posted content of the LSS file to make this thread more readable[/EDIT}
Last edit: 3 years 4 months ago by holch. Reason: Deleted the posted content of the LSS file to make this thread more readable
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago - 3 years 4 months ago #223030 by Joffm
Please, attach it
And we do not use "condition builder". "Relevance equation" is easier and more powerful.
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by Joffm.
The topic has been locked.
  • zara.szigeti
  • zara.szigeti's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #223031 by zara.szigeti
Please see attached
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #223040 by holch
If you use the condition builder, you need to use "scenarios" to get the AND option. If you just add questions to the condition, then it is always OR.

However, I am sure that with relevance equations this can be solved a lot quicker and easier.

Not able to have a look at your LSS right now, but maybe later.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
  • zara.szigeti
  • zara.szigeti's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #223042 by zara.szigeti
This is my issue (see attached screenshot). LimeSurvey automatically determines which logical operator to apply -- that being AND or OR. In this instance, LimeSurvey is making these conditions to be OR (i.e. If you've received EITHER your first or second dose of the vaccine, report the name of your second dose). I would like this question to be, If you've received your first AND second dose of the vaccine, report the name of your first AND second dose.

I'm unsure what to modify in order to make these AND conditions
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #223044 by holch
OK, found a couple of minutes waiting for something and wanted to have a look at your survey.

But come on! Joffm asked for an LSS export of the specific part, instead you sent a questionnaire with god knows how many questions and sub questions, without even telling us, which questions we are talking about. How should we know, which questions you are referring to and where they are among the 60+ questions in your questionnaire (by the way, who is supposed to fill 60+ questions??).

Help us to help you:
- Create a copy of your survey
- Delete everthing that is not necessary for this problem
- Export this clean copy as LSS
- Upload it here

Yes, it is a little bit more work on your side, but we are all doing this in our spare time, we are basically all users that help users.

And what I noticed, you have set this survey to be shown group by group. One of your groups has 48 questions. I think you should split this up into various groups and not have more than 2-3 questions in each group/page.

Scanning through the questions, I guess we are talking about W11 and following?

Then you just need to use something like this as relevance equation, if you use codes 1, 2 and 3 instead of A1, A2, A3. With A1, A2 and A3 the relevance equation will be a lot more complicated, so I recommend to go with 1, 2, 3 for the codes.

For all questions regarding the first dose:
Code:
W111 > 0
For all questions regarding the second dose:
Code:
W111 > 1
For all questions regarding the third dose:
Code:
W111 == 3

OK, I see that you have also "unkown", which is a problem, because I guess if someone says unknow, the little trick with > won't work.

In this case I would actually give "unknown" (how do people not know if they have been vacinated against Covid or not and how often? And those that won't know, should we trust any of their responses anyway? But that is a different topic...) the code 1 or even better 0. Then you can still use the codes for the relevance equation above. I think in LS 5 the field to insert this is not called "relevance equation" anymore, but rather "conditions".

By the way, have a look at the text of W111, there is an error.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: Joffm
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #223045 by holch
Sorry, but that screenshot is so tiny that I can't see anything on it.

But I have given you a solution already, via expression manager and relevance equations /conditions (using the respective field in the question itself).

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose