- Posts: 15
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Get value of array question answers?
- rcha88AA
- Topic Author
- Offline
- New Member
Less
More
6 years 3 weeks ago - 6 years 3 weeks ago #165733
by rcha88AA
Get value of array question answers? was created by rcha88AA
Hi, first of all thank you for LimeSurvey, it is fantastic.
My problem:
I have an array question (D01), with subquestions and text answers, and I want to use the answers with the expression manager.
My answers (the array headings) from left to right are 'AA', 'BB', 'CC', 'DD'.
It looks something like this:
I want to get the value of the answers.
For subquestion 1, I don't want to get 'CC', I want to get 2. (0 being AA, 1 being BB, 2 being C... etc)
And for subquestion 2, I want to get 1.
Is this possible, without using the assessment functionality?
Basically, I just want to get the x-value/position of each subquestion's answer.
Using this does not work for me, I always get a value of 0.
{sum(D01_SQ001.value, D01_SQ002.value)}
I think this .value requires the assesment values to be set up.
Thank you.
My problem:
I have an array question (D01), with subquestions and text answers, and I want to use the answers with the expression manager.
My answers (the array headings) from left to right are 'AA', 'BB', 'CC', 'DD'.
It looks something like this:
AA | BB | CC | DD | |
Ques 1 | X | |||
Ques 2 | X |
I want to get the value of the answers.
For subquestion 1, I don't want to get 'CC', I want to get 2. (0 being AA, 1 being BB, 2 being C... etc)
And for subquestion 2, I want to get 1.
Is this possible, without using the assessment functionality?
Basically, I just want to get the x-value/position of each subquestion's answer.
Using this does not work for me, I always get a value of 0.
{sum(D01_SQ001.value, D01_SQ002.value)}
I think this .value requires the assesment values to be set up.
Thank you.
Last edit: 6 years 3 weeks ago by rcha88AA.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
6 years 3 weeks ago #165738
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Get value of array question answers?
Hi,
well, you show us the answer labels "AA", "BB", ...
But what did you set as answer option codes?
Here you set 0, 1, 2, 3,...
Or do I misunderstand?
Joffm
well, you show us the answer labels "AA", "BB", ...
But what did you set as answer option codes?
Here you set 0, 1, 2, 3,...
Or do I misunderstand?
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: rcha88AA
The topic has been locked.
- rcha88AA
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
6 years 3 weeks ago #165854
by rcha88AA
Replied by rcha88AA on topic Get value of array question answers?
Joffm - thank you!
Yes, now if I set the answer codes like 0, 1, 2, 3 (before it was the default A1...)
and when I use this, I get the result I am looking for!
{sum(D01_SQ001, D01_SQ002)}
Thanks again.
Yes, now if I set the answer codes like 0, 1, 2, 3 (before it was the default A1...)
and when I use this, I get the result I am looking for!
{sum(D01_SQ001, D01_SQ002)}
Thanks again.
The topic has been locked.