- Posts: 51
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Possible to pre-populate array questions?
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
4 years 11 months ago #183622
by PaulMRFGR
Possible to pre-populate array questions? was created by PaulMRFGR
Is it possible to pre-populate array options in the following scenario:
Q1. Describe each person in your household and their relation to you
a. Person 1:
b. Person 2:
c. Person 3:
d. Person 4:
Q2. What is the age of each person?
a. [Will show Q1 = a]
b. [Will show Q1 = b]
etc
I'm aware that you can do the above in one big array question, but this won't work for the purposes of our survey.
So is it possible to use their answers from Q1 to change the Y-axis names in Q2?
Thank you.
Q1. Describe each person in your household and their relation to you
a. Person 1:
b. Person 2:
c. Person 3:
d. Person 4:
Q2. What is the age of each person?
a. [Will show Q1 = a]
b. [Will show Q1 = b]
etc
I'm aware that you can do the above in one big array question, but this won't work for the purposes of our survey.
So is it possible to use their answers from Q1 to change the Y-axis names in Q2?
Thank you.
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
4 years 11 months ago #183624
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Possible to pre-populate array questions?
What are the question types? Can you attach a small sample survey (.lss file) containing only the relevant questions?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
4 years 11 months ago #183625
by PaulMRFGR
Replied by PaulMRFGR on topic Possible to pre-populate array questions?
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
4 years 11 months ago #183626
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 Possible to pre-populate array questions?
What Tony wants are not screenshots, but a LSS file that only contains the two questions that are relevant for this issue.
Recreating your questions takes considerable time, so help the helpers to help you and provide a LSS file, so they don't have to spend unnecessary time on recreating your setup in order to be able to help you.
Recreating your questions takes considerable time, so help the helpers to help you and provide a LSS file, so they don't have to spend unnecessary time on recreating your setup in order to be able to help you.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
4 years 11 months ago #183627
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Possible to pre-populate array questions?
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
4 years 11 months ago #183629
by PaulMRFGR
Replied by PaulMRFGR on topic Possible to pre-populate array questions?
Hi there,
Please find the LSS file attached.
Thank you.
Please find the LSS file attached.
Thank you.
Attachments:
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
4 years 11 months ago - 4 years 11 months ago #183630
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Possible to pre-populate array questions?
Yes, as Joffm suggests, but as you are using an array-texts type, something like this:
...
Sample survey attached:
Code:
{Q1_SQ001_X001}
Code:
{Q1_SQ002_X001}
Code:
{Q1_SQ003_X001}
Code:
{Q1_SQ004_X001}
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 4 years 11 months ago by tpartner.
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
4 years 11 months ago #183655
by PaulMRFGR
Replied by PaulMRFGR on topic Possible to pre-populate array questions?
Hi Tony,
This is great, thank you so much for helping with this. Quick additional question, but is there anyway we can make the question mandatory but not require people to fill in all rows? For example, if they only have two people in their household (e.g. them + their wife), the next question still shows all subsequent rows allowing for 10 people - which the survey requires them to fill?
Thank you.
This is great, thank you so much for helping with this. Quick additional question, but is there anyway we can make the question mandatory but not require people to fill in all rows? For example, if they only have two people in their household (e.g. them + their wife), the next question still shows all subsequent rows allowing for 10 people - which the survey requires them to fill?
Thank you.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
4 years 11 months ago - 4 years 11 months ago #183663
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Possible to pre-populate array questions?
Well,
you can (or not) show the rows dynamically.
Enter in the subquestion relevance of
person 2 "!is_empty(Q1_SQ001)"
person 3 "!is_empty(Q1_SQ002)"
So only one empty row is displayed if the row before was filled.
The same in question "trips"
Show only rows where are data in Q1.
person 1 "!is_empty(Q1_SQ001)"
person 2 "!is_empty(Q1_SQ002)"
The oldest version I can test in is 2.06. I am not sure if the subquestion relevance is available in 2.05.
See:
Joffm
BTW:
Please overlook the layout of the trips question.
Who is able to read this?
Better to have the explanation separately. And the repeated "number of ... in a typical week" also should be separated as a general hint.
you can (or not) show the rows dynamically.
Enter in the subquestion relevance of
person 2 "!is_empty(Q1_SQ001)"
person 3 "!is_empty(Q1_SQ002)"
So only one empty row is displayed if the row before was filled.
The same in question "trips"
Show only rows where are data in Q1.
person 1 "!is_empty(Q1_SQ001)"
person 2 "!is_empty(Q1_SQ002)"
The oldest version I can test in is 2.06. I am not sure if the subquestion relevance is available in 2.05.
See:
Joffm
BTW:
Please overlook the layout of the trips question.
Who is able to read this?
Better to have the explanation separately. And the repeated "number of ... in a typical week" also should be separated as a general hint.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 11 months ago by Joffm.
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
4 years 11 months ago #183668
by PaulMRFGR
Replied by PaulMRFGR on topic Possible to pre-populate array questions?
Hi Joffm,
Thank you - just a quick question (sorry if this is a stupid thing to ask) but where do I actually set subquestion relevance?
Thank you - just a quick question (sorry if this is a stupid thing to ask) but where do I actually set subquestion relevance?
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12791
- Thank you received: 3941
4 years 11 months ago - 4 years 11 months ago #183670
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Possible to pre-populate array questions?
As I said, I am not sure if it is avauilable in your "stone age" version.
If yes, you find it here:
It's the "R"
Joffm
If yes, you find it here:
It's the "R"
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 11 months ago by Joffm.
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
4 years 11 months ago #183671
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Possible to pre-populate array questions?
There is no sub-question relevance in 2.05.
A possible solution would be to use separate array questions for each "row" and show/hide them via question relevance.
A possible solution would be to use separate array questions for each "row" and show/hide them via question relevance.
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: DenisChenu
The topic has been locked.