Welcome to the LimeSurvey Community Forum

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

Assign several values to an answer and sort out them in the report

  • mattheoh
  • mattheoh's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #132269 by mattheoh
Hi,

I read for a few hours, what Lime Survey can do, and it's pretty amazing.
I m not a developper but I m trying to understand the Expression Manager and Assessment "philosophy".
Before going further, I d like to be sure that I will be able to do what I want with this tool, that's why I m posting here ;)

here's my need : I have to create a tool to realize surveys / skills assesments

For each question of the survey, the answer corresponds to an advice.

For example :
Question 1
Answer A => advice A + advice E + advice I
Answer B => advice B
Answer C => advice C + advice K

Question 2
Answer A => advice D
Answer B => advice A + advice C
Answer C => advice E
Answer D => advice B + advice L

....

At the end of the survey, I have to generate a report which lists all the advices corresponding to the answers choosen, and classes from the most important to lowest, like that :
- advice B (6 times)
- advice A (3 times)
- advice E (1 time)
- advice L (1 time)

I hope Lime Survey could help me to achieve that... but I m not sure than you can assign several values to an answer, and sort out them in the final report.

Could you give some informations about that ?

Thanks per advance.

Matt
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago - 8 years 1 month ago #132271 by tpartner
Calculating a "count" for each advice can be done with Expression Manager in an equation type question. For example, assuming these are single-choice questions, for advice A, the expression would be something like:
Code:
{count(Q1 == 'A', Q2 == 'B', ...)}

Sorting them would likely require JavaScript, the details of which would depend on the "report" layout.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 1 month ago by tpartner.
The following user(s) said Thank You: mattheoh
The topic has been locked.
  • mattheoh
  • mattheoh's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago - 8 years 1 month ago #132277 by mattheoh
Thanks for the fast answer.
But I can have an answer which corresponds to several values. (I m not talking about a multi choice, but an answer which corresponds to several values)
That means :
Q1 would correspond to A + B + C ...
Q2 would correspond to B + D

Is it possible to do assessments like that ?
Last edit: 8 years 1 month ago by mattheoh.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #132280 by holch
I think Expression Manager can do what you want, but I am not 100% sure if I got you.

I assume that question 1 and question 2 only allow 1 answer per question, right? Or are they multipe responses?

Let's assume they are single response and I answer Q1 => A and Q2 => D. If I understood you right, you want to show me the advices A, E, I, B and L. Correct?

This is definitely doable. If you have a lot of questions, this might be quite a bit of work in EM, but should be doable.

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: mattheoh
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago - 8 years 1 month ago #132282 by tpartner

Is it possible to do assessments like that ?

Yes, you would have a separate "count" equation question each advice. So, for example, the count for advice E would also include Q1, answer A:
Code:
{count(Q1 == 'A', Q2 == 'C', ...)}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 1 month ago by tpartner.
The following user(s) said Thank You: mattheoh
The topic has been locked.
  • mattheoh
  • mattheoh's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #132283 by mattheoh

holch wrote: I think Expression Manager can do what you want, but I am not 100% sure if I got you.

I assume that question 1 and question 2 only allow 1 answer per question, right? Or are they multipe responses?

Let's assume they are single response and I answer Q1 => A and Q2 => D. If I understood you right, you want to show me the advices A, E, I, B and L. Correct?

This is definitely doable. If you have a lot of questions, this might be quite a bit of work in EM, but should be doable.


Sorry for my english wich is far from perfect ;)
I m going to try to resume clearly.

Let's say I have 3 single choice questions.
Each answer will correspond to one or several advices.

Example :

Question 1 :
Answer 1 => corresponds to (advices) A + B + C
Answer 2 => corresponds to B + D
Answer 3 => corresponds to D

I choose answer 1 , so my advices will be advice A and advice B and advice C

Question 2 :
Answer 1 => corresponds to B + C
Answer 2 => corresponds to A + D
Answer 3 => corresponds to B

I choose answer 1 , so my advices will be the B and C

Question 3 :
Answer 1 => corresponds to (advices) D
Answer 2 => corresponds to A + D
Answer 3 => corresponds to C

I choose answer 3 , so my advice will be the C

I will have a final report like this (sorting out my answers value)
  • Advice C (3 times)
  • Advice B (2 times)
  • Advice A (1 time)

Is my need clearer ?

tpartner wrote:

Is it possible to do assessments like that ?

Yes, you would have a separate "count" equation question each advice. So, for example, the count for advice E would also include Q1, answer A:
Code:
{count(Q1 == 'A', Q2 == 'C', ...)}


Ok, I see what you mean for the count.
But I don't see where / how in the tool you assign several values to an answer (is it where I put in in the screenshot ?)


Thanks again to both of you !
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #132284 by tpartner
In this example, you will have 4 equation type questions - each holds a count for an advice:

equationA --> {count(Q1 == '1', Q2 == '2', Q3 == '2')}
equationB --> {count(Q1 == '1', Q1 == '2', Q2 == '1, Q2 == '3'')}
equationC --> {count(Q1 == '1', Q2 == '1', Q3 == '3')}
equationD --> {count(Q1 == '2', Q1 == '3', Q2 == '2', Q3 == '1', Q3 == '2')}

So, now you have recorded in the data a count for each advice. You can also use JavaScript to access these counts and sort the advices accordingly.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: mattheoh
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #132285 by holch
Read about expression manager and equation type questions. The only problem that I see is the sorting part. Show the advices should be fairly straight forward.

I would work with several equation questions. I guess I would write the count for each advice into one equation question. Then you could check in another equation question the count and if it is greater than zero, you would show it. Now the sorting part is a little out of my league, I think only Tpartner can help there.

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: mattheoh
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #132286 by tpartner

Now the sorting part is a little out of my league, I think only Tpartner can help there.

As I said, that would depend on the layout of the report screen.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: mattheoh
The topic has been locked.
  • mattheoh
  • mattheoh's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #132289 by mattheoh
wawww ! thanks for all these advices.
I really appreciate it.
I have enough information for a good start.
I will come back here, if I meet some other problems.
Thanks again ! Take care.
The topic has been locked.
  • mattheoh
  • mattheoh's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago - 8 years 1 month ago #133008 by mattheoh
Hi there,
I just finished to build my survey. And everything works perfectly , with the equation questions which permit me to make the count depending the answers... Thanks again for your precious help !

My next question concerns the report. I need to have a pdf report for each participant who fulfilled the survey.
I activated assessment, but I don't see how in the html box, display information I want.

For example , my report will be like that :
E1 (equation question 1) result different from 0 => display text1
E2 (equation question 2) result different from 0 => dislay text2
...

Is it possible to add some code in the html box to do that ?
I tried something like that :
Code:
{if(E1 >= 1,
'my text 1'
)
}
but doesn't seem working

Or maybe assessment, is not the good solution...

Thanks per advance for your advices.

PS : I continue this topic cause it concerns a point I mentionned in the title, but if it's better to open a new one, just let me know, I will do it immediately in a better place and close this one.
Last edit: 8 years 1 month ago by mattheoh.
The topic has been locked.
  • mattheoh
  • mattheoh's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #133011 by mattheoh
It worked... I had to put a minimum / maximum for evaluation (even if don't use it)
I will make new post for more specific question.
You can consider this topic as SOLVED ! :)
Thanks again
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose