- Posts: 162
- Thank you received: 14
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show results of ranking
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
4 years 8 months ago #187616
by teracomp
Dave Phillips
Show results of ranking was created by teracomp
I have a simple survey that asks a supervisor to pick 8 to 10 of 22 items and put them in rank order.
Once they're done, I want to show them their results.
Creating the ranking question is simple enough, but I don't see how to display the results after they click "next."
LSS attached if needed.
Thanks!
Once they're done, I want to show them their results.
Creating the ranking question is simple enough, but I don't see how to display the results after they click "next."
LSS attached if needed.
Thanks!
Dave Phillips
Attachments:
The topic has been locked.
- mbates
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 1
4 years 8 months ago #187621
by mbates
Replied by mbates on topic Show results of ranking
Create an Array(Texts) that is shown to the user. Use an Equation that populates the cells in the Array according to the rankings in the previous question.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 8 months ago #187627
by jelo
www.limesurvey.org/forum/can-i-do-this-w...d-expression-manager
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Show results of ranking
Why populating an array question? Wouldn't plain Expression Script (Expression Manager) work to display the rankings? I never tried it and some scripting functions are missing (e.g. to lookup with rank a certain element has), but just displaying rank 1 to x will work with textdisplay alone, right?mbates wrote: Create an Array(Texts) that is shown to the user. Use an Equation that populates the cells in the Array according to the rankings in the previous question.
www.limesurvey.org/forum/can-i-do-this-w...d-expression-manager
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: tpartner, teracomp
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
4 years 8 months ago - 4 years 8 months ago #187631
by teracomp
Dave Phillips
Replied by teracomp on topic Show results of ranking
Ah...that gives me the detail I needed.
The question name is MRanking, so the top 8 to 10 would be MRanking_1, MRanking_2, etc.
Since I require a minimum of 8, I can safely display MRanking_1.shown, MRanking_2.shown, ... MRanking_8.shown.
I'll need to test for the existence of 9 & 10 and show the results or "Not Used".
This is all I needed for the expression question.
<ol>
<li>{MRanking_1.shown}</li>
<li>{MRanking_2.shown}</li>
<li>{MRanking_3.shown}</li>
<li>{MRanking_4.shown}</li>
<li>{MRanking_5.shown}</li>
<li>{MRanking_6.shown}</li>
<li>{MRanking_7.shown}</li>
<li>{MRanking_8.shown}</li>
<li>{if(MRanking_9.NAOK, MRanking_9.shown, "Not Used")}</li>
<li>{if(MRanking_10.NAOK, MRanking_10.shown, "Not Used")}</li>
</ol>
Thanks for the advice!
The question name is MRanking, so the top 8 to 10 would be MRanking_1, MRanking_2, etc.
Since I require a minimum of 8, I can safely display MRanking_1.shown, MRanking_2.shown, ... MRanking_8.shown.
I'll need to test for the existence of 9 & 10 and show the results or "Not Used".
This is all I needed for the expression question.
<ol>
<li>{MRanking_1.shown}</li>
<li>{MRanking_2.shown}</li>
<li>{MRanking_3.shown}</li>
<li>{MRanking_4.shown}</li>
<li>{MRanking_5.shown}</li>
<li>{MRanking_6.shown}</li>
<li>{MRanking_7.shown}</li>
<li>{MRanking_8.shown}</li>
<li>{if(MRanking_9.NAOK, MRanking_9.shown, "Not Used")}</li>
<li>{if(MRanking_10.NAOK, MRanking_10.shown, "Not Used")}</li>
</ol>
Thanks for the advice!
Dave Phillips
Last edit: 4 years 8 months ago by teracomp. Reason: added .shown to MRanking_9
The topic has been locked.