Expression Manager summary with placeholders: how to only show specific answers

More
2 years 9 months ago #116441 by eleren
eleren created the topic: Expression Manager summary with placeholders: how to only show specific answers
Case: array question with 5-step label from "don't agree at all" to "completely agree" and, say, 6 subquestions.
I found out how to display the answers in a "text display" question type.
But how can I display only the "don't agree at all" answers?
And how can I filter out the "non applicable" answers?

manual.limesurvey.org/Expression_Manager...e_using_placeholders

Please Log in to join the conversation.

More
2 years 9 months ago #116443 by holch
holch replied the topic: Expression Manager summary with placeholders: how to only show specific answers
Well, you will need to write an expression that first checks the value of the answer (e.g. something like "if answer1 == 1 then write "blablabla".

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

Please Log in to join the conversation.

More
2 years 9 months ago #116445 by eleren
eleren replied the topic: Expression Manager summary with placeholders: how to only show specific answers
OK, I understand, but I can't figure out the right syntax:

I tried
{if(Q1_sq001.shown=='don't agree at all')}{Q1_sq001.question}: {Q1_sq001.shown}
but his gives me a syntax error.

Please Log in to join the conversation.

More
2 years 9 months ago #116448 by holch
holch replied the topic: Expression Manager summary with placeholders: how to only show specific answers
Of course, because it is not a valid EM syntax. Have a look at the examples in the manual and I think you'll figure it out.

You need to understand how the "if" loop in EM is built. Because you say "if something happens." Full stop. You closed the expression. You need to give it something to work with within {}.

Have a look at the examples here using if:

manual.limesurvey.org/Expression_Manager

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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!