Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: how to use ranking type question answer in other question?

how to use ranking type question answer in other question? 2 years 9 months ago #100642

  • limesun
  • limesun's Avatar
add one ranking type question,with 5 items:a,b,c,d,e.
suppose participant rank item a as the first, item e as the sencond.then i need to use the ranking result in other question:
you rank a as the first, rank e as the second
.
the problem is: i have no idea how to do it.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 9 months ago #100749

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
If the ranking question code is "rank1", then try this:

you rank {rank1_1.shown} as the first, rank {rank1_2.shown} as the second...
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 9 months ago #100786

  • limesun
  • limesun's Avatar
the key problem is how to get{first},{second}
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 9 months ago #100803

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
Did you try it? Those expressions will give the first ranked and second ranked items.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 8 months ago #101156

  • mikuhrs
  • mikuhrs's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hello there,

I have an additional question regarding this topic:

After a ranking question, I want to use a the top ranked fruit name (e. g. "apple") in the next question: "Why do you like apple?".

Unfortunately, what I get is an error (s. attachment).

Any ideas what went wrong?

Thanks in advance an best regards

Michael
Attachments:
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 8 months ago #101158

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
What is the question code of your ranking type question?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 8 months ago #101159

  • mikuhrs
  • mikuhrs's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hello Tony,

the question code is "Auswahl" (it is in question 2644).

Best regards

Michael
Last Edit: 2 years 8 months ago by mikuhrs. Reason: typo
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 8 months ago #101160

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
Then this should work:

{Auswahl_1.shown}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103508

  • MarcellavZ
  • MarcellavZ's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
Hello Tony,

I have a follow-up question on the question ascribed above. I also want to use a answer in the text of the next question. It's a multiple choice question with the option 'other'. Participants need to choose what kind of snack they eat the most and than i want to know what kind of snack specific they eat. I tried the solution you described but when I try it I only see the 'equation' surrounded by thick red lines. The answer isn't coming up in the text. What am I doing wrong? The code of the question is 'gs'.

Thanks!
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103510

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
Can you attach a small sample survey?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103519

  • MarcellavZ
  • MarcellavZ's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
Yes, off course but it is in Dutch so I don't know if it would be of any help..

The link to the survey is:
survey.fss.uu.nl/416242/lang-nl-informal

The question is about the last 2 questions. The answer of the second last question needs to be linked to the text of the follow up question.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103524

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
No, I mean attach an export of a sample survey containing the pertinent groups so I can see your question codes, etc.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103526

  • MarcellavZ
  • MarcellavZ's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
I'm sorry. I just started so it's all abracadabra for me. I exported two files, but when I export my survey structure I get a blank file. My computer can't open it, bu you will find it under .lss. The other file I exported was a 'tab-sepereted-values format' and that one is a PDF file. The questions where it is about are marked in yellow. I don't know if this is the export you mean, but I can't export anymore. Thanks anyway for the quick responding and your help!
Attachments:
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103527

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
Okay. it's the .lss file that I was looking for.

I'm not sure why you are using a multiple-choice for question "gs" and then limit the answers to 1 selection.

I would use a List (Radio) for question "gs" and set "other comment mandatory" to yes.

Then your expression for the piped text in the following question could be:
{if(gs.shown != '-oth-', gs.shown, gs_other.shown)}

This effectively says:
- If gs does not equal "Other", display the radio label
- Otherwise, display the "Other" text input value

Here is your survey back with those changes made.

File Attachment:

File Name: limesurvey...FIED.lss
File Size:44 KB


Oh, and I noticed several invalid question codes. They should all be unique, consist of only letters and numbers with no spaces and start with a letter.

.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 2 years 6 months ago by tpartner.
The administrator has disabled public write access.

how to use ranking type question answer in other question? 2 years 6 months ago #103536

  • MarcellavZ
  • MarcellavZ's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
Good morning! Thank you very much. I woke up very happy seeing that it works now. Thanks for the tips. I will change it immediately. And I see that you changed the lay-out. Much better now (how you did it, I don't know but than again I am still learning and I have a long way to go). Thanks again!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.302 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form