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?

More
9 years 3 months ago - 9 years 3 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: 9 years 3 months ago by tarantel123.
The topic has been locked.
More
9 years 3 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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tarantel123
The topic has been locked.
More
9 years 3 months ago #137498 by tarantel123
Thanks, for some reason it didn't work at first.. maybe because the survey wasn't active!?
The topic has been locked.
More
9 years 3 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose