- Posts: 27
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Conditionals in the end message
- ordogz
- Topic Author
- Offline
- Junior Member
Less
More
7 years 2 months ago - 7 years 2 months ago #148550
by ordogz
Conditionals in the end message was created by ordogz
Hello,
I'm trying to use the approach below, for my survey:
{if(howmany == 1, price1.question,'')}
{if(howmany == 2, price2.question,'')}
{if(howmany == 3, price3.question,'')}
{if(howmany == 4, price4.question,'')}
{if(howmany == 5, price5.question,'')}
But, for some unknown reason( of course for me ...), it works only for one report(ICReport...see in the lss attached file, in the end message of the survey)
For the other two ( DSReport and ECReport) it's not showing anything in the end message, even if I'm using the same conditionals just with different answers.
Please help me in my endeavor to make this functional.
Thank you!
I'm trying to use the approach below, for my survey:
{if(howmany == 1, price1.question,'')}
{if(howmany == 2, price2.question,'')}
{if(howmany == 3, price3.question,'')}
{if(howmany == 4, price4.question,'')}
{if(howmany == 5, price5.question,'')}
But, for some unknown reason( of course for me ...), it works only for one report(ICReport...see in the lss attached file, in the end message of the survey)
For the other two ( DSReport and ECReport) it's not showing anything in the end message, even if I'm using the same conditionals just with different answers.
Please help me in my endeavor to make this functional.
Thank you!
Attachments:
Last edit: 7 years 2 months ago by ordogz.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
7 years 2 months ago - 7 years 2 months ago #148557
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Conditionals in the end message
It seems that in "DemScore" and "ECScore", you have a space after the equations so your IF statements can never be true because they don't include that space.
Remove all spaces from the equation questions or, even better, remove it with the trim function in your IF statements.
Remove all spaces from the equation questions or, even better, remove it with the trim function in your IF statements.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 2 months ago by tpartner.
The following user(s) said Thank You: holch
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2742
7 years 2 months ago #148567
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Conditionals in the end message
Great catch, Tpartner. I was looking for any problems, but I couldn't find anything. I did not think of spaces though.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.