Welcome to the LimeSurvey Community Forum

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

Placeholder within conditional text

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 7 months ago #187256 by blocka
Placeholder within conditional text was created by blocka
Is there a way to return a question response within a conditionally returned text, like this:

{if(Q10_SQ006>0, 'For the {Q10_SQ006} item(s), please provide a brief summary.', '')}

What I'd like to have it return is :

For the 10 item(s), please provide a brief summary.

That is, return the value of Q10_SQ006 ....

I get a feeling this isn't possible, but figure I'll ask...
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #187258 by Joffm
Replied by Joffm on topic Placeholder within conditional text
Hi, blocka,
you may use:

{if(Q3_SQ002=="Y","Please, for "+Q3_SQ002.question+" give a summary!","")}



Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago - 4 years 7 months ago #187267 by Joffm
Replied by Joffm on topic Placeholder within conditional text
And if you want to display all checked items you should use the list-function

Example:
{if(count(that.Q3)>0,"Please, for "+list(Q3_SQ001.shown,Q3_SQ002.shown,Q3_SQ003.shown,Q3_SQ004.shown,Q3_SQ005.shown,Q3_SQ006.shown)+" give a summary!","")}



Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 7 months ago by Joffm.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 7 months ago #187351 by blocka
Replied by blocka on topic Placeholder within conditional text
In my case, Q10_SQ006 is a numeric multiple type question, so the respondent enters a value -- will Q10_SQ006.question return the value they entered?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #187356 by Joffm
Replied by Joffm on topic Placeholder within conditional text
No,
xxx.question returns the question; in this case the text of the subquestion. In my first example "Beaver" was the text of the subquestion.
manual.limesurvey.org/Expression_Manager...#Access_to_variables

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 7 months ago #187359 by blocka
Replied by blocka on topic Placeholder within conditional text
Got it, and I see that :

{if(Q10_SQ006>0, "For the " + Q10_SQ006.shown + " item(s), please provide a brief summary.", "")}

Displays the value that the respondent entered for Q10_SQ006 -- so I see:

For the 5 item(s), please provide a brief summary...
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose