- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Random selection of 4 questions (matrixes) among 12 with additional conditions
- synthoscope
- Topic Author
- Offline
- New Member
Less
More
7 years 9 months ago #139533
by synthoscope
Random selection of 4 questions (matrixes) among 12 with additional conditions was created by synthoscope
Hello,
I have an interesting logical case, but can't find a solution.
There is one filter question (let it be B55). It's a matrix with 12 companies in the rows.
And there are additional 12 questions B56a, B56b, B56c etc. up to B56l (12 questions for each company). Each of these 12 questions can be asked only if in previous filter matrix B55 there was code 3 or 4 for the company (which means 'the person knows the company').
But only random 4 questions among these B56a...B56l can be shown.
If the person knows 12 companies - only random 4 must be shown.
If the person knows 4 companies - only these 4 are shown.
If the person knows 3 or less companies - only these 3 or less are shown.
I really need the advice.
I have an interesting logical case, but can't find a solution.
There is one filter question (let it be B55). It's a matrix with 12 companies in the rows.
And there are additional 12 questions B56a, B56b, B56c etc. up to B56l (12 questions for each company). Each of these 12 questions can be asked only if in previous filter matrix B55 there was code 3 or 4 for the company (which means 'the person knows the company').
But only random 4 questions among these B56a...B56l can be shown.
If the person knows 12 companies - only random 4 must be shown.
If the person knows 4 companies - only these 4 are shown.
If the person knows 3 or less companies - only these 3 or less are shown.
I really need the advice.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12943
- Thank you received: 3979
7 years 9 months ago - 7 years 9 months ago #139535
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Random selection of 4 questions (matrixes) among 12 with additional conditions
Hi, synthoscope,
well, if the respondent only knows 4 or less companies it's just relevance.
To find your 4 out of "more than four" known companies you will find a starting point in the manual:
manual.limesurvey.org/Expression_Manager...e_Question_Per_Group
and
manual.limesurvey.org/Expression_Manager..._of_the_questions.29
Sorry, not to be of more help.
Kind regards
Joffm
well, if the respondent only knows 4 or less companies it's just relevance.
To find your 4 out of "more than four" known companies you will find a starting point in the manual:
manual.limesurvey.org/Expression_Manager...e_Question_Per_Group
and
manual.limesurvey.org/Expression_Manager..._of_the_questions.29
Sorry, not to be of more help.
Kind regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 years 9 months ago by Joffm. Reason: Ergänzung
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
7 years 9 months ago #139554
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Random selection of 4 questions (matrixes) among 12 with additional conditions
It seems to me that you can achieve the "If the person knows 12 companies - only random 4 must be shown" part by randomizing the question order and, for each question, have a relevance statement that requires the sum of the relevance status for all other questions to be less than 4. Search the forums for "relevanceStatus".
So, for example, the relevance statement for B56a would be something like this;
(please excuse typos - I'm writing this on my phone from memory)
So, for example, the relevance statement for B56a would be something like this;
Code:
(B55_a == 3 OR B55_b == 4) AND sum(B56b.relevanceStatus, B56c.relevanceStatus, B56d.relevanceStatus, ... , B56l.relevanceStatus) < 4
(please excuse typos - I'm writing this on my phone from memory)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.