- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
MCQ - 3 answers, 2 mandatory and 1 optional
- Janhayled_290772
- Topic Author
- Offline
- Banned
Less
More
2 years 10 months ago - 2 years 10 months ago #216247
by Janhayled_290772
MCQ - 3 answers, 2 mandatory and 1 optional was created by Janhayled_290772
Hi everyone,
For this survey, I want people to choose between two 2 people, A or B.
And if they want, they could tick a 3rd answer "random draw".
I didn't manage to made the choice "Person A" or "Person B" compulsory and at the same time "Random draw" optional with a question validation equation.
I've tried several things :
- I used to assign an assessment value to each subquestion, but it's doesn't work with MCQ, so I used a table : if(sum(Q1_SQ001.value, Q2_SQ002.value) >= 1, 1, 0)
- I tried to use some fomulas : if(Q1_SQ001.question=="Person A", 0, if(Q1_SQ002.question=="Person B", 0, 1))
- Or this formula ("random draw" for the entire SQ003 subquestion) if(Q1_SQ003=="random draw", 0, 1))
With each formulas, in the logical module, I have this formula :
I've looked for other topics on question validation equation, but I didn't find something about this sum.
Please let me know if someone have an idea.
Thanks a lot.
Taka
For this survey, I want people to choose between two 2 people, A or B.
And if they want, they could tick a 3rd answer "random draw".
I didn't manage to made the choice "Person A" or "Person B" compulsory and at the same time "Random draw" optional with a question validation equation.
I've tried several things :
- I used to assign an assessment value to each subquestion, but it's doesn't work with MCQ, so I used a table : if(sum(Q1_SQ001.value, Q2_SQ002.value) >= 1, 1, 0)
- I tried to use some fomulas : if(Q1_SQ001.question=="Person A", 0, if(Q1_SQ002.question=="Person B", 0, 1))
- Or this formula ("random draw" for the entire SQ003 subquestion) if(Q1_SQ003=="random draw", 0, 1))
With each formulas, in the logical module, I have this formula :
Code:
(VALIDATION: (1) and ((sum( ! (if([url=https://enquetes.unicaen.fr/index.php/admin/questions/sa/view/surveyid/696871/gid/33328/qid/377821]Q1_SQ001.question[/url] == "Person A", 0, if([url=https://enquetes.unicaen.fr/index.php/admin/questions/sa/view/surveyid/696871/gid/33328/qid/377821]Q1_SQ002.question[/url] == "Person B", 0, 1)))) == 0)))
Please let me know if someone have an idea.
Thanks a lot.
Taka
Attachments:
Last edit: 2 years 10 months ago by Janhayled_290772. Reason: Incomplete first message
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3699
2 years 10 months ago #216250
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 MCQ - 3 answers, 2 mandatory and 1 optional
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: Janhayled_290772
The topic has been locked.
- Janhayled_290772
- Topic Author
- Offline
- Banned
Less
More
- Posts: 3
- Thank you received: 0
2 years 10 months ago #216252
by Janhayled_290772
Replied by Janhayled_290772 on topic MCQ - 3 answers, 2 mandatory and 1 optional
Many thanks, it works
Kind regards
Taka
Kind regards
Taka
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
2 years 10 months ago #216254
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic MCQ - 3 answers, 2 mandatory and 1 optional
Wait. You have 3 answers. Either Person A, or Person B or random.
Isn't that simply a single choice question with 3 answer options??
Isn't that simply a single choice question with 3 answer options??
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Janhayled_290772
- Topic Author
- Offline
- Banned
Less
More
- Posts: 3
- Thank you received: 0
2 years 10 months ago #216267
by Janhayled_290772
Replied by Janhayled_290772 on topic MCQ - 3 answers, 2 mandatory and 1 optional
Hello Holch,
Here are the possible answer pattern :
- Person A
- Person B
- Person A + random
- Person B + random
I don't want people to pick "random" alone without choosing between A and B, and indeed the formula Tony gave work perfectly.
Many thanks to you and Tony
Taka
Here are the possible answer pattern :
- Person A
- Person B
- Person A + random
- Person B + random
I don't want people to pick "random" alone without choosing between A and B, and indeed the formula Tony gave work perfectly.
Many thanks to you and Tony
Taka
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
2 years 10 months ago #216303
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic MCQ - 3 answers, 2 mandatory and 1 optional
Ahhh, OK, this didn't make sense to me. Now it is clearer.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.