Welcome to the LimeSurvey Community Forum

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

How to display Subquestion as per the previous selected Subquestion.

  • satyam123
  • satyam123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 11 hours ago #268737 by satyam123
Hi,
I want to know, How to display Subquestion as per the previous selected Subquestion.
For example, Two questions 1st question for color names and 2nd question for fruits name, 1st options Subquestion like : Red, Blue, Green, Yellow, Black. 2nd question Subquestion like : Apple, Guava, orange, Banana, Mango.
Now if any one selecte Red or Green in the 1st question, then the Guava display in the 2nd question Subquestion.  Other wise Guava is not display in the 2nd question Subquestion. 

Thank you,

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 10 hours ago - 1 week 10 hours ago #268739 by Joffm
Hi,
what type of question?

You write "subquestion", so I suppose "multiple".
That's easy.
Use subquestion relevance with the respective conditions, like
"red was selected in Q1 OR green was selected in Q1"
(depends on the question type)
 

If you use single questions it's a bit more.
You have to create a hidden "multiple" question, set the allowed subquestions in a question of type "equation".
Then you use this multiple question as array filter for your single "fruit" question.

So, please explain better, answer the questions at the beginning (which you again ignored and removed), provide a lss export of a sample.

Joffm

BTW: This is obviously not a topic of "Installation & Update issues", but of "Can I do this in LimeSurvey".
Please pay attention to these categories in the future
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 week 10 hours ago by Joffm.
The following user(s) said Thank You: satyam123

Please Log in to join the conversation.

  • satyam123
  • satyam123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 9 hours ago #268742 by satyam123
Hi Joffm,

Thank you for your help, it is helpful.

Regards,

Please Log in to join the conversation.

  • satyam123
  • satyam123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 days 11 hours ago #268808 by satyam123
Hi,

I want to Know, How to use same think in in single choice(like : List (radio)).

Regards,

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 days 11 hours ago #268810 by Joffm

You have to create a hidden "multiple" question, set the allowed subquestions in a question of type "equation".
Then you use this multiple question as array filter for your single "fruit" question.

The equation may look like (HM the hidden multiple question)
{HM_1=if(Q1==1,"Y","")}
{HM_2=if(Q1==2,"Y","")}
...

No more as long as you still ignore to answer the question about your version, your hosting, ... and do not provide a lss export of the relevant questions


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • satyam123
  • satyam123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 days 15 hours ago #268843 by satyam123
Hi,

Find the attched lss file and question for the refernce.

Regards,

Please Log in to join the conversation.

  • satyam123
  • satyam123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 days 15 hours ago #268844 by satyam123
I need dispaly option 3 and 4 in Q2 when any one select 1 or 3 option of Q1.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 days 10 hours ago #268857 by Joffm

I need dispaly option 3 and 4 in Q2 when any one select 1 or 3 option of Q1.

How do I read this?
1. If Q1==1 OR Q1==3: only option 3 and option 4 in Q2, , but all options if Q1==2?
2. If Q1==1 OR Q1==3: all 4 options in Q2, but only option 1 and option 2 if Q1==2?


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • satyam123
  • satyam123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 day 16 hours ago #268892 by satyam123
If any one select option 2 in Q1 then option 1 and 2 display.
either display all Q2 option.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 6 hours ago #268929 by Joffm
Hi,
1. You have to display either "question by question" or "group by group" with each of your questions in one group
2. In group 2 create a (hidden) question of type "multiple" (HM) with the same subquestion codes as your Q2.
3. In group 1 create a (hidden) question of type "equation" (eqHM). Here you preset the subquestions of HM.
Enter the equation into the question eqHM.
a. option 1 and option 2 are dispalyed always
{HM_1="Y"}
{HM_2="Y"}

b. option 3 and option 4 are only dispalyed if Q1!=2
{HM_3=if(Q1!=2,"Y","")}
{HM_4=if(Q1!=2,"Y","")}

4. Set the "array filter" of Q2 on this question HM.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose