using code from subquestions

More
4 years 1 month ago #95230 by tnegulic
tnegulic created the topic: using code from subquestions
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

Please Log in to join the conversation.

More
4 years 1 month ago #95255 by tnegulic
tnegulic replied the topic: using code from subquestions
this is not working eather

{if(O2_SQO11=='No',"- "+O2_SQO11.subquestion+": "+O2_SQO11.value,"")}

Please Log in to join the conversation.

More
4 years 1 month ago #95260 by tpartner
tpartner replied the topic: using code from subquestions
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.

Please Log in to join the conversation.

More
4 years 1 month ago #95290 by tnegulic
tnegulic replied the topic: using code from subquestions
Array type of question with value Yes and No

Please Log in to join the conversation.

More
4 years 1 month ago #95291 by tnegulic
tnegulic replied the topic: using code from subquestions
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.

Please Log in to join the conversation.

More
4 years 1 month ago #95319 by tnegulic
tnegulic replied the topic: using code from subquestions
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:

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now