Welcome, Guest
Username: Password: Remember me

TOPIC: using code from subquestions

using code from subquestions 11 months 4 weeks ago #95230

  • tnegulic
  • tnegulic's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
I am using this syntax
{if(O1.NAOK=="Y","- "+O1.question+": "+O1.shown,"")}

{if(O4.NAOK=="Y","- "+O4.question+": "+O4.shown,"")}

{if(O6.NAOK=="Y","- "+O6.question+": "+O6.shown,"")}

{if(O9.NAOK=="Y","- "+O9.question+": "+O9.shown,"")}

for display all answers in YES/No questions where answer is yes.
But, how to use this syntax with subquestions. I have few questions with 10 yes/no subquestions. What code to use? I try with subquestion code but it doesnt work

Tomislav
The administrator has disabled public write access.

using code from subquestions 11 months 4 weeks ago #95255

  • tnegulic
  • tnegulic's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
this is not working eather

{if(O2_SQO11=='No',"- "+O2_SQO11.subquestion+": "+O2_SQO11.value,"")}
The administrator has disabled public write access.

using code from subquestions 11 months 4 weeks ago #95260

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 3814
  • Thank you received: 683
  • Karma: 328
What question type are the "questions with 10 yes/no subquestions"?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

using code from subquestions 11 months 3 weeks ago #95290

  • tnegulic
  • tnegulic's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Array type of question with value Yes and No
The administrator has disabled public write access.

using code from subquestions 11 months 3 weeks ago #95291

  • tnegulic
  • tnegulic's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
So for better understanding this is example of questions.

Array

In your town is there some of following:

See Yes No
Forrest Yes No
Metro Yes No
etc etc etc

So now i want that if user pick No from any of this subquestion, that question and his answer (No) will show up at the end off questionnaire.
The administrator has disabled public write access.

using code from subquestions 11 months 3 weeks ago #95319

  • tnegulic
  • tnegulic's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Find the solution:
this syntax is working but in 2.0 versions and up..
{if(O2_SQO11=="L002","- "+O2_SQO11.question+": "+O2_SQO11.show,"")}

So if we have question:

O2: In your town is there some of following:
SQO11: See L001 Yes L002 No
SQO12 Metro Yes No
SQO13 Forrest Yes No

and the user for the metro and see clik NO and the end of survey will stand:

Dear user, you said that in your town there is no:

-see:No
-metro:No

I only dont know how to display basic question O2

In your town is there some of following:
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.120 seconds
Donation Image