Welcome, Guest
Username: Password: Remember me

TOPIC: Setting conditions

Setting conditions 2 years 10 months ago #67685

  • jvanbussel
  • jvanbussel's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
What is the best approach for this: I want Question 10 only displayed when at least two of the previous questions were answered "Yes"? Do i have to make scenario's for all possible options? 1 yes + 2 yes, 1 yes + 3 yes, ....
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67697

  • jvanbussel
  • jvanbussel's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Additional info:

Q1 > answers are radio buttons: Yes =1, No = 2, do not know= 99, no answer = 0
Q2 > answers are radio buttons: Yes =1, No = 2, do not know= 99, no answer = 0
...
Q9 > answers are radio buttons: Yes =1, No = 2, do not know= 99, no answer = 0

So Q10 only if at least 2 questions out of Q1 - Q9 were answerd Yes ...

If it works only with scenario's, i 'll need 9² (81!) scenario's ... so if there 's another solution ...
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67705

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4133
  • Thank you received: 763
  • Karma: 347
Assuming all questions are on the same page, it would be easier to control this with a little JavaScript. What question type is Q10? Are there any other questions on the page?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67710

  • jvanbussel
  • jvanbussel's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
hello tony, ... the questions are each on a separate page, the Q10 is also a radio button question ...
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67745

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4133
  • Thank you received: 763
  • Karma: 347
Are you using group "group-by-group" mode.

If so, you could put a hidden question in the Q9 group and use {INSERTANS} and JavaScript to populate the hidden question with the number of "Yes" answers. Then apply a condition to Q1 - "Only show Q10 if QHidden > 1".
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: jvanbussel

Re: Setting conditions 2 years 10 months ago #67749

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
There is no feature at Limesurvey yet which support counting the number of "yes" answers so you have to work around it or use a customized Javascript solution.

Maybe this will be supported at the upcoming Limesurvey 2.0 using the powerful Expression Manager: docs.limesurvey.org/Expression+Manager

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: jvanbussel

Re: Setting conditions 2 years 10 months ago #67794

  • jvanbussel
  • jvanbussel's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Many thnx for the info and suggestions.

I realy suggest that this type of conditioning is possible in LS2.0. I'm currently developing a CAPI (Computer assisted Personal Interview - so face to face) with LS1.91. It includes a psychiatric diagnostic interview. Most of these interviews heavely depend on yes - no questions and the logic of the questions is often determined by the number of symptoms present (so the number of "yes"s).

In my CAPI I've chosen to present each question on a new screen. The questions are grouped by disorder. Often you first have a list with symptoms (Q1-Q9) and then questions on age of onset (Q10), how many times (Q11), etc... Q10 and later only relevant if a given number of symptoms are present, otherwise, the interviewer is forwarded to a new set op symptoms (related to another disorder)...

Do you know where i can find assistance for this type of javascript into LS1.91 (We want to start in dec2011 with our study so waiting for LS2.0 is not an option)? I'm willing to finance the writing of this script.

Thnx,
Johan
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67802

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
I'll point two developers to this thread. TMSwhite should be able to tell if this feature will exist at Limesurvey 2.0.
User tpartner is our Javascript expert and offers advanced (paid) support, he should be able to help you out with some customized code.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67807

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4133
  • Thank you received: 763
  • Karma: 347
Johan, I have sent a PM with my contact details.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Setting conditions 2 years 10 months ago #67828

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Johan-

You can definitely do this with LS 2.0.

FYI, the Expression Manager is a re-tooling into PHP (from Java) of a program I wrote a decade ago to manage complex psychiatric diagnostic interviews and epidemiological surveys via a combination of CAPI and CASI techniques. For example, I implemented the full SCID-I and II, and my office-mate implemented the C-DISC in English and Spanish. Since I have a paper copy to work from, it was really easy If memory serves, it took the better part of a day to do the full SCID-II in that tool. It would have been faster, but the epidemiologist I was working with wanted to implemented the minimum number of questions necessary and sufficient to rule in or rule out each question. So, the subject was asked each of the ~250 primary questions. Then we'd compute the scale score for each personality disorder, and if they tentatively met criteria for it, we'd have a psychologist ask tailored follow-up questions about each symptom acknowledged by the subject. The psychologist's questions would indicate whether the person truly met criteria. We'd then recompute the scale score based upon the psychologist's response and skip the next set of follow-ups as soon as the subject definitely met (or could not longer meet) diagnostic criteria for the disorder.

Anyway, here's how you would do for Q10. Assuming you named your variables Q1-Q9, you would set the "relevance" for Q10 to be the following:
sum(Q1==1,Q2==2,Q3==1,Q4==1,Q5==1,Q6==1,Q7==1,Q8==1,Q9==1) >= 2

This will ensure that Q10 is only displayed if at least 2 of Q1-Q9 are answered yes, regardless of whether they are the same or different pages.

/Tom
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.188 seconds
Donation Image