Welcome to the LimeSurvey Community Forum

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

Assessments with personalized messages depending on the score.

More
7 years 9 months ago #161037 by moisespaivaspi
Hmmm I'm understanding logic.
So in my case when wanting to calculate and present a message depending on the result of two groups what would be an example?

With best regards and thanks again.
Moisés
The topic has been locked.
More
7 years 9 months ago #161038 by tpartner
Place an equation question for the "Score" in each group and then another "Total" equation question that sums the "Score" questions. Base your tailoring on the "Total" question.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 9 months ago #161039 by moisespaivaspi
I do not understand very well now.
Can I send you my survey and can you exemplify one of the conditions?

When I look at an example, I'll be able to replicate in other conditions that are missing.

Best regards.
More
7 years 9 months ago #161041 by tpartner
I'm sorry, I do not have the time to go through your survey.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 9 months ago #161042 by moisespaivaspi
It does not matter. It has helped me a lot.
Thanks for all the help.

Best regards.
Moisés
The topic has been locked.
More
7 years 9 months ago #161056 by moisespaivaspi
Hello Tpartner.

I've been trying to implement the example of one of my conditions during the day but the result is always the same. When I want to join the two conditions with an "AND" it tells me that the syntax is not supported.

Can you tell me how to interlink the two conditions?

Best regards.
Moisés
The topic has been locked.
More
7 years 9 months ago - 7 years 9 months ago #161061 by tpartner
Please refer to the manual - Expression Manager --> Access to functions --> if

- www.limesurvey.org/manual/Expression_Man...mplemented_Functions

The syntax is:
Code:
if(test, result_if_true, result_if_false)

So, your example would be:
Code:
if(scoreP2A < 28 AND scoreP2B < 18, 'YESSSSSS', '')

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 9 months ago by tpartner.
The topic has been locked.
More
7 years 9 months ago #161062 by holch
Well, you have at least a few syntax errors. I didn't test it and I can't tell you if the idea itself will work, but I am pretty sure that the second "(" in your syntax is not correct.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
7 years 9 months ago #161063 by holch

tpartner wrote:
...but, I don't understand the logic - if scoreP2A is less than 18, it is also obviously less than 28.


the second one is scoreP2B. ;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
7 years 9 months ago #161065 by tpartner
Duh...fixed...

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 9 months ago #161067 by holch
At least now I know for sure that my response wasn't totally stupid. Haven't played with LS in a while and feel that I am getting rusty.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
7 years 8 months ago #161080 by moisespaivaspi
Good Morning.

It's already working. The problem was syntax.

Thank you very much.
You all taught me a lot.

Best regards.
Moises Paiva
The topic has been locked.
More
7 years 8 months ago #161083 by moisespaivaspi
Good morning again.

I have another problem. I want to use a sort of else if since I will have a message to be displayed depending on 6 if's.

What is the correct syntax for using else if?

I leave the example in the image that is giving me error when I enter the second if.

Best regards.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose