IF score = 10 show "Your score is 37 out of 100" etc.

More
10 months 1 week ago #148000 by Reveb
Reveb created the topic: IF score = 10 show "Your score is 37 out of 100" etc.
For school i have made a survey with questions and answers with assessment scores. These together i counted up and put into a enquation question.

{sum(P3_SQ001.value, P5_SQ001.value, P6_SQ001.value, P8_SQ001.value, P10_SQ001.value, P12_SQ001.value, P14_SQ001.value)}

With the outcome of this score i have a scorelist:

0 = 0
1 = 10,6
2 = 17,5
3 = 21,9
Etc.

0,1,2,3 here being the assesment score, and 0, 10,6 ,17,5 , 21,9 being the final score.

This could be done with IF statement like :
{if(Psych==0, 'Your score is 0 out of 100' if)}

{if (Psych==1, 'Your score is 10,6 out of 100')}

But this is not working so i'm stuck at this point, cause i can't find any solutions..
If anyone would be able to help i'd appreciate that :)

Reveb
The topic has been locked.
More
10 months 1 week ago #148002 by Mazi
Mazi replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
"Does not work" is not a proper error message :-)

I assume your question is using question code "Psych"?

When using such variable always use "NAOK":
OLD: {sum(P3_SQ001.value, P5_SQ001.value, P6_SQ001.value, P8_SQ001.value, P10_SQ001.value, P12_SQ001.value, P14_SQ001.value)}
NEW: {sum(P3_SQ001.valueNAOK, P5_SQ001.valueNAOK, P6_SQ001.valueNAOK, P8_SQ001.valueNAOK, P10_SQ001.valueNAOK, P12_SQ001.valueNAOK, P14_SQ001.valueNAOK)}

OLD: {if(Psych==0, 'Your score is 0 out of 100' if)}
NEW: {if(Psych.NAOK==0, 'Your score is 0 out of 100' ,'')}

Note the syntax details for nested IF statements like IF... ELSEIF ... ELSEIF ... ELSE...:
manual.limesurvey.org/Expression_Manager#Syntax


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: Reveb
The topic has been locked.
More
10 months 1 week ago #148005 by Reveb
Reveb replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
Hey Mazi thanks for the quick respond.

As for now i changed the .NAOK and got to this:

{if(Psych.NAOK == 0, 'Your score is 0 out of 100', if (Psych.NAOK == 1, 'Your score is 10,6 out of 100', if (Psych.NAOK == 2, 'Your score is 17,5 out of 100', 'Something went wrong')))}

This for me always gives Something went wrong.
And since i have to do this for 34 assessments how would you do this?

Reveb
The topic has been locked.
More
10 months 1 week ago - 10 months 1 week ago #148007 by Joffm
Joffm replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
Hi, reveb,

why do you crosspost?
You have the discussion about that with holch for several hours in the other section of the forum.

Regards
Joffm
Last Edit: 10 months 1 week ago by Joffm. Reason: typo
The topic has been locked.
More
10 months 1 week ago #148009 by Mazi
Mazi replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
So I assume {Psych.NAOK} also outputs 0 all the time?

Are you using the "assessment" feature as well? Because this is a different feature with no relation to the Expression Manager.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The topic has been locked.
More
10 months 1 week ago #148010 by holch
holch replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
I just saw this as well. Not a good move. :-(

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The topic has been locked.
More
10 months 1 week ago #148011 by Reveb
Reveb replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
Since that is in the Can i do this with limesurvey? And i started there asking if something was possible.

Since most of the developers are probaly looking into this group i thought it would be smart putting it in to the development topic. And Holch told me maybe Tpartner or Denis could help me out.

Reveb
The topic has been locked.
More
10 months 1 week ago #148013 by Reveb
Reveb replied the topic: IF score = 10 show "Your score is 37 out of 100" etc.
TOPIC CLOSED
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!