- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Condition sub-questions on sub-questions (rows in arrays)
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
3 weeks 4 days ago #259858
by GuillaumePEPIN
Condition sub-questions on sub-questions (rows in arrays) was created by GuillaumePEPIN
Please help us help you and fill where relevant:
Your LimeSurvey version: [Version 6.4.12+240311]
Survey theme/template: Hérite [fruity]
==================
Hi there,
I have a question about being able to condition sub-questions (rows in one array) on sub-questions (rows in another array). I have an initial table with 10 sub-questions that affect the presence of items in 12 other question tables. Sub-question 1 in table 2, sub-question 1 in table 3 (and so on up to table 13) must depend on a particular answer to sub-question 1 in table 1. Similarly, sub-questions 2 in Tables 2, 3 and 4 to 13 must depend on the answer to sub-question 2 in Table 1. The sub-questions in Tables 2 to 13 must therefore appear according to the answer to the corresponding sub-question in Table 1.
In Limesurvey I can find out how to create conditions for the whole question (i.e. the table), but not for each row of the table (sub-question). Do you know if this is possible and if so, how? Can it be done with javascript code? If so, I don't know where to write it.
If not, do you have another way of doing it that would save me having to create 120 questions (because what I've shown you is only 20% of the study). Creating tables whose rows depend on the answers in the rows of the first table would make the questionnaire cleaner, faster and more intuitive for the participants.
Thank you for your reply. Have a nice day all,
Guillaume
Your LimeSurvey version: [Version 6.4.12+240311]
Survey theme/template: Hérite [fruity]
==================
Hi there,
I have a question about being able to condition sub-questions (rows in one array) on sub-questions (rows in another array). I have an initial table with 10 sub-questions that affect the presence of items in 12 other question tables. Sub-question 1 in table 2, sub-question 1 in table 3 (and so on up to table 13) must depend on a particular answer to sub-question 1 in table 1. Similarly, sub-questions 2 in Tables 2, 3 and 4 to 13 must depend on the answer to sub-question 2 in Table 1. The sub-questions in Tables 2 to 13 must therefore appear according to the answer to the corresponding sub-question in Table 1.
In Limesurvey I can find out how to create conditions for the whole question (i.e. the table), but not for each row of the table (sub-question). Do you know if this is possible and if so, how? Can it be done with javascript code? If so, I don't know where to write it.
If not, do you have another way of doing it that would save me having to create 120 questions (because what I've shown you is only 20% of the study). Creating tables whose rows depend on the answers in the rows of the first table would make the questionnaire cleaner, faster and more intuitive for the participants.
Thank you for your reply. Have a nice day all,
Guillaume
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12955
- Thank you received: 3984
3 weeks 4 days ago - 3 weeks 4 days ago #259861
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Condition sub-questions on sub-questions (rows in arrays)
Hi,
Joffm
Here it isbut not for each row of the table (sub-question). Do you know if this is possible and if so, how?
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 weeks 4 days ago by Joffm.
Please Log in to join the conversation.
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 weeks 4 days ago - 3 weeks 4 days ago #259863
by GuillaumePEPIN
Replied by GuillaumePEPIN on topic Condition sub-questions on sub-questions (rows in arrays)
Hello!
Thank you very much for your time and your reply.
However, what you're suggesting isn't working for me. Maybe I'm doing it wrong.
I've attached 2 screenshots. The first is the first table whose sub-questions will determine the presence of the sub-questions in the table in the second image.
Knowing that HAFa is the first question with sub-questions of the type HAF1, HAF2, HAF3, etc, this is what I've written
HAFa_HAF1=="AO02"
Is it wrong? Should I use Q and SQ even if I rename the variables?
Thank you very much for your time and your reply.
However, what you're suggesting isn't working for me. Maybe I'm doing it wrong.
I've attached 2 screenshots. The first is the first table whose sub-questions will determine the presence of the sub-questions in the table in the second image.
Knowing that HAFa is the first question with sub-questions of the type HAF1, HAF2, HAF3, etc, this is what I've written
HAFa_HAF1=="AO02"
Is it wrong? Should I use Q and SQ even if I rename the variables?
Attachments:
Last edit: 3 weeks 4 days ago by GuillaumePEPIN.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12955
- Thank you received: 3984
3 weeks 4 days ago #259864
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Condition sub-questions on sub-questions (rows in arrays)
Please send the lss export of the survey (these relevant questions)
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 weeks 4 days ago #259865
by GuillaumePEPIN
Replied by GuillaumePEPIN on topic Condition sub-questions on sub-questions (rows in arrays)
Thanks again for your time.
You can find attached the two groups of questions relevant for our example with 1 question (table) and 9 subquestions (lines) each.
The objective is that the subquestion of question 2 should only appear if the answer at the subquestion of question 1 is 1, 2, 3 or 4 (not 0, e.g AO01)
Thank you very much for your time !!
You can find attached the two groups of questions relevant for our example with 1 question (table) and 9 subquestions (lines) each.
The objective is that the subquestion of question 2 should only appear if the answer at the subquestion of question 1 is 1, 2, 3 or 4 (not 0, e.g AO01)
Thank you very much for your time !!
Attachments:
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12955
- Thank you received: 3984
3 weeks 4 days ago #259867
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Condition sub-questions on sub-questions (rows in arrays)
Hi,
obviously there was a glitch in the survey structure.
In these cases you only can
I improved your codes - changed to numerical codes.
The your condition is "HAF_1>0" instead of all the "ORs"
Joffm
Joffm
obviously there was a glitch in the survey structure.
In these cases you only can
- remove entirely
- create new
I improved your codes - changed to numerical codes.
The your condition is "HAF_1>0" instead of all the "ORs"
Joffm
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 weeks 4 days ago #259869
by GuillaumePEPIN
Replied by GuillaumePEPIN on topic Condition sub-questions on sub-questions (rows in arrays)
Hello!
Wow, this will definitely improve our survey.
Thanks again, you rock man!
Guillaume
Wow, this will definitely improve our survey.
Thanks again, you rock man!
Guillaume
Please Log in to join the conversation.
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 weeks 3 days ago #259908
by GuillaumePEPIN
Replied by GuillaumePEPIN on topic Condition sub-questions on sub-questions (rows in arrays)
Hi There,
I would like some help if you have time for another round of questions.
I did exactly as you told me and it was working perfectly. Today i expanded the questionnaire (almost 500 condition questions) and when I tested it it did not work. I created a very short version of the questionnaire and it is not working anymore neither. Given your advice, I dont know why.
I would like that subquestions in the second group (HAPD) only appear if the result on the subquestions of the first question of the first group (HAF) is above 0. However rows in the arrays appear whatever the answer is. Can you explain to me why its like this ?
Here is the short version of the questionnaire. I maintained 3 questions in the first group (HABruitClassement, HAOpen and HADescrExp) only because it may have impact the results.
Thanks a lot for you time if you have it !
I would like some help if you have time for another round of questions.
I did exactly as you told me and it was working perfectly. Today i expanded the questionnaire (almost 500 condition questions) and when I tested it it did not work. I created a very short version of the questionnaire and it is not working anymore neither. Given your advice, I dont know why.
I would like that subquestions in the second group (HAPD) only appear if the result on the subquestions of the first question of the first group (HAF) is above 0. However rows in the arrays appear whatever the answer is. Can you explain to me why its like this ?
Here is the short version of the questionnaire. I maintained 3 questions in the first group (HABruitClassement, HAOpen and HADescrExp) only because it may have impact the results.
Thanks a lot for you time if you have it !
Attachments:
Please Log in to join the conversation.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11667
- Thank you received: 2742
3 weeks 3 days ago #259917
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Condition sub-questions on sub-questions (rows in arrays)
I am a little surpised. I have deleted all unnessary questions, as this issue has only to do with HAF and HAPD and the subquestion relevance seems to have no effect.
I couldn't find any error in your syntax, so I am a little confused now. I will see if I'll find some more time later tonight to investigate.
I couldn't find any error in your syntax, so I am a little confused now. I will see if I'll find some more time later tonight to investigate.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12955
- Thank you received: 3984
3 weeks 2 days ago #259957
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Condition sub-questions on sub-questions (rows in arrays)
Yes, it is really strange.
When I create the identical survey from scratch everything is as expected.
I am sure, if @holch does it, he will get the same result.
So why is it different, when you create the survey in your environment?
I do not know.
Joffm
When I create the identical survey from scratch everything is as expected.
I am sure, if @holch does it, he will get the same result.
So why is it different, when you create the survey in your environment?
I do not know.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 weeks 2 days ago #259958
by GuillaumePEPIN
Replied by GuillaumePEPIN on topic Condition sub-questions on sub-questions (rows in arrays)
Hello!
Indeed, it is weird on my side too. Because it was working at first and when I developed the questionnaire by adding groups and questions, I then realized it was not working properly. I did not change the code but I may have change some parameters (questions being mandatory for example). Do you think it might cause the problem? Is there a way to investigate differences in the caracteristics of two questionnaires (mine and yours built from scratch) to see what are the differences?
On my side, I will try to do it again from scratch and assess if it is working at each step, but there is definitely something I dont understand.
However, thanks for your time!!
Guillaume
Indeed, it is weird on my side too. Because it was working at first and when I developed the questionnaire by adding groups and questions, I then realized it was not working properly. I did not change the code but I may have change some parameters (questions being mandatory for example). Do you think it might cause the problem? Is there a way to investigate differences in the caracteristics of two questionnaires (mine and yours built from scratch) to see what are the differences?
On my side, I will try to do it again from scratch and assess if it is working at each step, but there is definitely something I dont understand.
However, thanks for your time!!
Guillaume
Please Log in to join the conversation.
- GuillaumePEPIN
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 weeks 1 day ago #260050
by GuillaumePEPIN
Replied by GuillaumePEPIN on topic Condition sub-questions on sub-questions (rows in arrays)
Hi there,
No improvement on my side, do you have any advice on where to look, what to do? Someone to contact or something to read?
Thanks again for your time,
Guillaume
No improvement on my side, do you have any advice on where to look, what to do? Someone to contact or something to read?
Thanks again for your time,
Guillaume
Please Log in to join the conversation.