- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Unify provided response options in a filtered questions
- alexandrosi
- Topic Author
- Offline
- New Member
I would appreciate your help on the following challenge I have:
I have a multiple-choice question (Q1) which is used as a filter for another question (Q2) (type of Q2 is Array (Numbers)). Let me give you an example to make myself clear:
Q1. Please select which of the following project outcomes you have used so far:
a. 2018 Webinar
b. 2019 Webinar
c. 2018 Flyer
d. 2019 Flyer
e. 2018 Handbook
f. 2019 Handbook
Q2. Where did you use the project outcomes in:
If someone selects a and/or b then I want one option to appear "Webinar". The same goes with remaining Q1 options. If c and/or d then I want one option "Flyer", and for e and/or f then "Handbook".
(I don't know if it is relevant or helpful but at Q2. the x-scale subquestions will be: "Presentations", "Promotional materials", "Consultations", "Other").
Thank you in advance for your help.
Alexandros
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3593
!is_empty(Q1_a) OR !is_empty(Q1_b)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- alexandrosi
- Topic Author
- Offline
- New Member
- Posts: 6
- Thank you received: 0
My real situation was a bit more complicated than the example I gave. More conditions should have been met in order for the !is_empty(Q1_a)... to work.
I found a workaround in case someone is interested.
In Q1, I created a kind of "checkbox" headers like "Webinar", "Flyer", Handbook". If someone checked one of these options then several options appeared underneath based on the year of the "outcome" (i.e. 2017 webinar, 2018 webinar, 2019 webinar).
In Q2, only the checked headers appeared. The remaining subquestions (i.e. 2017 webinar...) were ruled out using "0" in the relevance field of the subquestion.
Thanks again.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12923
- Thank you received: 3977
My real situation was a bit more complicated than the example I gave
And why did you only give a limited example?
How can we give real help if we don't know all circumstances?
And there are some examples in the forum to show a two or three-level multiple answer.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
- alexandrosi
- Topic Author
- Offline
- New Member
- Posts: 6
- Thank you received: 0
Joffm wrote:
And why did you only give a limited example?
How can we give real help if we don't know all circumstances?
Joffm
Dear Joffm,
Thanks for your feedback which is highly appreciated. No need to be offensive with newbies though. I was trying to be as concise as possible. Obviously that was not helpful to anyone.
In any case, I would appreciate anyone's help in several issues that I have with my survey. This is why I attach an .lss file.
Issue #1: Thanks to Joffm, I found instructions on how to show a two-level multiple question. I also imported an example which works smoothly. However, when I apply it to my survey, I can't tick the boxes of the secondary questions. The question code is S1Q0
Issue #2: Is there any way so as S1Q1b and S1Q2 appear only when any subquestion of S1Q1a is checked?
Issue #3: In "Question Group 2", I ask for responders' feedback only for subquestions of S1Q2 with rating "Not at all useful" or "Slightly useful". It works quite well except for:
a. when no S1Q2 subquestion is answered as "Not at all useful" or "Slightly useful" . Then "Question Group 2" appears but without any reason. Can I bypass it if this scenario occurs? (i.e. "Question Group 2")
b. when in "Question Group 2" (question "OUTCOMERating") and I hit the "previous" button any changes to the answers of S1Q2 are not reflect to question "OUTCOMERating". Is it a bug?
Thanks a lot for any help.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12923
- Thank you received: 3977
I can't import this lss export.
Tried LS 3.22.1. and 4.1.1.
So please copy your survey, remove all not relevant questions and export, attach again.
Your questions:
You should remove the </script><script> in the middle of your script.I can't tick the boxes of the secondary questions. The question code is S1Q0
</script> <script type="text/javascript" charset="utf-8"> // A function to handle "secondary" checkboxes
You should use the count-function, likeIs there any way so as S1Q1b and S1Q2 appear only when any subquestion of S1Q1a is checked?
Relevance of S1Q1b: count(that.S1Q1a)==xx
You should use the countifop-function, likewhen no S1Q2 subquestion is answered as "Not at all useful" or "Slightly useful" . Then "Question Group 2" appears but without any reason. Can I bypass it if this scenario occurs? (i.e. "Question Group 2")
countifop(">","3",that.S1Q2) lt 1 , where "Not at all useful" and "Slightly useful" are coded "5" and "4".
Addition: I opened your lss with a text editor and saw that there are still the default codes "A1," "A2", ...
In this case you cannot use this countifop. Numerical codes are always easier to handle and of course better to analyse. How do you think to calculate a mean of "A1", "A2", ...
As I can't import, no idea.when in "Question Group 2" (question "OUTCOMERating") and I hit the "previous" button any changes to the answers of S1Q2 are not reflect to question "OUTCOMERating".
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
Any error message? I attach a reimport of the LSS.Joffm wrote: Sorry,I can't import this lss export.
Tried LS 3.22.1. and 4.1.1.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users