Welcome to the LimeSurvey Community Forum

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

Lookup answer from previous response data?

  • ossvirt
  • ossvirt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #119082 by ossvirt
Hello all,

how can I lookup a response answer in a previously submitted survey and use it to set the default answer in a second survey? For example -:

Survey 1
Question 1 - select your name from a dropdown
Question 2 - Does QA point 1 pass? - []Yes, []No, [x]No Answer - user changes to []Yes, [x]No, []No Answer
Survey finished and submitted.

Survey 2
Question 1 - select your name from a dropdown - uses to lookup previous completed survey response.
Question 2 - Does QA point 1 pass now? - []Yes, [x]No, []No Answer - user changes to [x]Yes, []No, []No Answer

Each survey completed is for a different person so the answer has to be found from the correct response set.

I want to try to do this without user tokens for simplicity, just by looking up users in a question, it may be a bit hacky like that. I hope there's some way to do this, any help much appreciated. Thanks!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119083 by holch
Replied by holch on topic Lookup answer from previous response data?
The way you describe it, this would only be possible via custom coding.

Easier would be tokens. Not sure what makes tokens less "simple". There is also a certain concern about privacy, because everyone could check the answer given by others (might not be problem in your case, but in many cases it could be a problem so I thought I'd mention this).

With tokens you could store the answer to the question 2 from the first survey and then include it as custom attribute into the token table for the second survey. Then you can access the value of this custom attribute within the second survey.

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

The following user(s) said Thank You: ossvirt
The topic has been locked.
  • ossvirt
  • ossvirt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago - 8 years 11 months ago #119085 by ossvirt
Replied by ossvirt on topic Lookup answer from previous response data?
Thank you for your reply. So I guess I will use tokens. I'm trying limesurvey for a simple in-house feedback system so I am repurposing it a bit and trying to keep it quick and simple. I'm new to it so I guess the real answer is that the token system scared me off a bit, in terms of how long it might take me to understand :) I'll look through the manual again.

Any quick reference points for me to check out in the manual beyond manual.limesurvey.org/Tokens

Thanks for your very quick response.
Last edit: 8 years 11 months ago by ossvirt. Reason: adding manual URL
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119086 by holch
Replied by holch on topic Lookup answer from previous response data?
The token system is actually pretty simple, but yet you can do a lot of cool stuff.

So you can send individual links to each participant (no one can respond for someone else), you can pass variables through the token table.

E.g. the department. So if there are questions, that should only be asked for specific departments, you don't need to ask the department the person is in, but you know it already through the token table and you can use this information to hide specific questions or to pipe in the department into questions, etc.

Read 10-20min, play a little and I will be sure that you will love it.

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

The following user(s) said Thank You: ossvirt
The topic has been locked.
  • ossvirt
  • ossvirt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #119087 by ossvirt
Replied by ossvirt on topic Lookup answer from previous response data?
Great, yes that's the sort of thing I'm looking for. OK, tokens are my friend! I'll read up. Thanks very much for your help.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose