- Posts: 53
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change subquestion order based on the users ranking in a previous question?
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
4 years 6 months ago #189496
by PaulMRFGR
Change subquestion order based on the users ranking in a previous question? was created by PaulMRFGR
We currently have two questions in the survey:
1) Asks them to rank several options
2) Asks them to provide a price that they'd be willing to pay for each option
For (2), we'd like the order of the subquestions to change depending on their ranking in (1). Meaning the subquestions would show in order of their preferred rank to least preferred rank. Is this possible at all?
I'm attaching an example of the above questions if needed at all.
Thank you for any help in advance!
1) Asks them to rank several options
2) Asks them to provide a price that they'd be willing to pay for each option
For (2), we'd like the order of the subquestions to change depending on their ranking in (1). Meaning the subquestions would show in order of their preferred rank to least preferred rank. Is this possible at all?
I'm attaching an example of the above questions if needed at all.
Thank you for any help in advance!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
4 years 6 months ago #189506
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change subquestion order based on the users ranking in a previous question?
Please, send a lss (complete survey) with only one group …
Else, if ranking question have Rank as title
{Rank_1.shown} in sub question of numeric question does the trick.
Else, if ranking question have Rank as title
{Rank_1.shown} in sub question of numeric question does the trick.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 53
- Thank you received: 0
4 years 6 months ago #189507
by PaulMRFGR
Replied by PaulMRFGR on topic Change subquestion order based on the users ranking in a previous question?
Hi DenisChenu,
Thanks for your reply - I'm attaching the lss here if you're able to demonstrate what you mean at all?
Thanks again.
Thanks for your reply - I'm attaching the lss here if you're able to demonstrate what you mean at all?
Thanks again.
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12916
- Thank you received: 3975
4 years 6 months ago #189514
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Change subquestion order based on the users ranking in a previous question?
Hi,
first of all you should have said, that you do not use a ranking question but an array to fake the ranking.
This is absolutely different regarding the storing of answers in the database and therefore Denis' proposal probably won't work.
Well, you can use micro-tayloring:
subquestion text of first ranked item:
{if(Ranking_1==1,"RANK A",if(Ranking_2==1,"RANK B",if(Ranking_3==1,"RANK C",if(Ranking_4==1,"RANK D",if(Ranking_5==1,"RANK E",if(Ranking_6==1,"RANK F",if(Ranking_7==1,"RANK G",if(Ranking_8==1,"RANK H","RANK I"))))))))}
second:
{if(Ranking_1==2,"RANK A",if(Ranking_2==2,"RANK B",if(Ranking_3==2,"RANK C",if(Ranking_4==2,"RANK D",if(Ranking_5==2,"RANK E",if(Ranking_6==2,"RANK F",if(Ranking_7==2,"RANK G",if(Ranking_8==2,"RANK H","RANK I"))))))))}
and so on.
But realize:
In your answer table the first column of prices will contain the price of the item on first place, whatever it was.
Joffm
first of all you should have said, that you do not use a ranking question but an array to fake the ranking.
This is absolutely different regarding the storing of answers in the database and therefore Denis' proposal probably won't work.
Well, you can use micro-tayloring:
subquestion text of first ranked item:
{if(Ranking_1==1,"RANK A",if(Ranking_2==1,"RANK B",if(Ranking_3==1,"RANK C",if(Ranking_4==1,"RANK D",if(Ranking_5==1,"RANK E",if(Ranking_6==1,"RANK F",if(Ranking_7==1,"RANK G",if(Ranking_8==1,"RANK H","RANK I"))))))))}
second:
{if(Ranking_1==2,"RANK A",if(Ranking_2==2,"RANK B",if(Ranking_3==2,"RANK C",if(Ranking_4==2,"RANK D",if(Ranking_5==2,"RANK E",if(Ranking_6==2,"RANK F",if(Ranking_7==2,"RANK G",if(Ranking_8==2,"RANK H","RANK I"))))))))}
and so on.
But realize:
In your answer table the first column of prices will contain the price of the item on first place, whatever it was.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 53
- Thank you received: 0
4 years 6 months ago #189517
by PaulMRFGR
Replied by PaulMRFGR on topic Change subquestion order based on the users ranking in a previous question?
Thank you both!
I ended up changing the question to a standard ranking question and going with DenisChenu's suggestion and it worked like a charm.
Can I just say that this forum is absolutely fantastic for getting LS support for someone who isn't overly familiar with coding. You're all so helpful!
I ended up changing the question to a standard ranking question and going with DenisChenu's suggestion and it worked like a charm.
Can I just say that this forum is absolutely fantastic for getting LS support for someone who isn't overly familiar with coding. You're all so helpful!
The topic has been locked.