Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Use Respondant Answer Input Value in Subsequent Question

  • Abbaddon223
  • Abbaddon223's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #244506 by Abbaddon223
LimeSurvey Community Edition Version 5.6.10+230313
Self Hosted Using cPanel
Default Theme
==================
This is my first post so any feedback is welcome, and I'm similarly quite new to Limesurvey.

Thank you in advance for any kind support

My Query

If it is possible, I would like to know how I am able to use the value of respondants prior answer, as a variable in a subsequent question.

For example

Question 1 - How many peices of fruit do you each per day
Respondants Answer - 5

Question 2 - Select the {5} peices of fruit you eat from the below....

In Question 2, the bracketed value would be the called variable.

It's important to note that the called variable would need to reference the live respondants previous answer value, and not call a value from a completed survey (and obviously not a static value)

I understand to acheive this (if it can be done), that the answer to question 1 would need to be declared via a static variable name. I'm used to working with VBA and would normally approach this

Dim Q1A1 As String
Q1A1 = [FieldName]

Then in Question 2, I would call this akin to

="Select the " & Q1A1 & " peices of fruit you eat from the below"

Does Limesurvey have this type of functionality please?


 

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #244508 by holch
Read about the expression manager / script and "piping" or micro tayloring in the manual.

Can't search the links for you at the moment, but you'll find it quite easily.

Depending on the question type it is quite simple.

For a single answer question for example {Q1} will give you the chosen answer code for the question Q1 and {Q1.shown} will give you the text of the answer option shown to the respondent.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • Abbaddon223
  • Abbaddon223's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #244509 by Abbaddon223
That's absolutely spot on! I'll go and check that out.

The question type is Multiple numerical input so the slider feature to be used (I can change this if it causes an issue).

Thank you for your help, that's really appreciated.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose