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
  • PaulMRFGR's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago #189496 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.

File Attachment:

File Name: limesurvey...1394.lsg
File Size:16 KB


Thank you for any help in advance!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #189506 by DenisChenu
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.

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
  • PaulMRFGR's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago #189507 by PaulMRFGR
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.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #189514 by Joffm
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

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
  • PaulMRFGR's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago #189517 by PaulMRFGR
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!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose