Welcome to the LimeSurvey Community Forum

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

Lookupvalue in LimeSurvey

  • nunochambellima
  • nunochambellima's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #230026 by nunochambellima
Lookupvalue in LimeSurvey was created by nunochambellima
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 2.05+ Build 140915
Own server or LimeSurvey hosting: Own Server
Survey theme/template: Customized
==================
Hi,

is it possible to do a kind of a lookupvalue between two questions in LimeSurvey (like in excel)?
I have an excel file with a column with names and another with a primary key.
Participants should select from a list the primary key in the first question. Could the result of this selection be returned to the participant as the name which is in the second column, for example?

Better yet: participants should insert in a numerical input question the primary key and the result be returned as the name associated to it. If there is no association between the two fiels, return the message text box: "The number you entered is not valid."

Thank you very much

Nuno

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago - 2 years 11 months ago #230028 by tpartner
Replied by tpartner on topic Lookupvalue in LimeSurvey
This will require significant JavaScript development, out of the scope of this forum.

1) Use jQuery.csv to pull in the CSV content and create an array of arrays.
- github.com/evanplaice/jquery-csv

2) Place a listener on the first input:
- jQuery on('keyup') event - api.jquery.com/on/

3) Use jQuery to dynamically update the value of the second element:
- api.jquery.com/val/

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 11 months ago by tpartner.

Please Log in to join the conversation.

  • nunochambellima
  • nunochambellima's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #230030 by nunochambellima
Replied by nunochambellima on topic Lookupvalue in LimeSurvey
Thank you very much.

Cheers,

Nuno

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose