Welcome to the LimeSurvey Community Forum

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

How to pass TOKEN data to multiple choice question?

  • tarantel123
  • tarantel123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago - 7 years 10 months ago #137485 by tarantel123
Hi! I need to filter out some subquestions in an array type question. I could use array filter, but can I do this without asking the participant the prior question and instead filling a hidden multiple choice question instead with data based on TOKENS? The filtering attributes are previously known and I can't show the criteria to the participant. I've heard it's possible to have TOKEN data inserted into hidden question, but couldn't find a usable example. Array subquestions in 2.5 seem to also have relevance equation, but I couldn't get it to work with token data.. ((TOKEN:ATTRIBUTE_1 == "1"))

Thanks in advance!

The case is for example:

Participant A, has qualities X, Y (TOKEN:attribute_1=1, TOKEN:attribute_2=1)

Q1. How do rate..? (array type)
1 2 3 4 5

quality X
quality Y
----
Participant B, has qualities X, Z (TOKEN:attribute_1=1, TOKEN:attribute_3=1)

Q1. How do rate..? (array type)
1 2 3 4 5

quality X
quality Z
Last edit: 7 years 10 months ago by tarantel123.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #137494 by DenisChenu
In last 2.06 and after : you can set relevance by specifi equation for each sub question.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: tarantel123
The topic has been locked.
  • tarantel123
  • tarantel123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #137498 by tarantel123
Replied by tarantel123 on topic How to pass TOKEN data to multiple choice question?
Thanks, for some reason it didn't work at first.. maybe because the survey wasn't active!?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #137502 by DenisChenu
What is your buil number and your limesurvey version ?

And for testing : you need toi use == and not =.

Example for quality X
Code:
{(TOKEN:ATTRIBUTE_1=="1" and  TOKEN:ATTRIBUTE_2="1") OR (TOKEN:ATTRIBUTE_1=="1" and  TOKEN:ATTRIBUTE_3="1")}

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose