Welcome to the LimeSurvey Community Forum

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

Assign default values in multiple choice with matrix filter

  • ali123456789
  • ali123456789's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 1 week ago #252244 by ali123456789
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 6.1.8+230717
Own server or LimeSurvey hosting: own server
Survey theme/template: Monochrome template
==================
Dear all,

participants in a survey are asked to select relevant options in a multiple choice question. To identify the really relevant options, their choices are shown again in second multiple choice question (via matrix filter). I want the shown options to be selected as default once the question loads. I added an equation question that contains the following code for each choice option in between the first and second selection round.

{questionname_itemname = if(is_empty(questionname_itemname), 1, questionname_itemname)}

It does not work. Does anyone know how I can preselect the filtered response options so that participants would only have to unselect the irrelevant?

Thanks,
Ali

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252252 by Joffm
Hi,
there is one issue and one unnecessary thing.

1. You use the wrong syntax.
Who told you to set the value to "1"?
It's always a good idea to activate the survey, enter some data and have a look at the table of responses.
And here you see that in "multiple" questions "selected" is stored as "Y", otherwise blank.
 

2. What do you do in your equation?
You set all subquestions of Q2 to "selected" (if they are empty they are set to "selected", if they are yet selected they stay)
So this whole IF construct is not necessary.
It would be sufficient to say
{Q2_SQ001="Y"}
{Q2_SQ002="Y"}
...

But a much better way to achieve this is to set the "default answers" to "selected"
 

Joffm

By the way: I really do not like this scenario.
Do you think a respondent will unselect something? He is comfortable to be able to proceed without having to read or think (the question is already answered)
Always better to force him to select something actively.
Of course: Up to you.


 

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

Please Log in to join the conversation.

  • ali123456789
  • ali123456789's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 1 week ago #252259 by ali123456789
Thanks so much for pointing out my error and how to do it right! Also, good advice regarding lazy responding.

My attempt was based on this entry: forums.limesurvey.org/forum/installation...assign-default-value

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago - 5 months 1 week ago #252260 by Joffm
But this "old" thread was about a question of type "array"

You use a "multiple" question. 
This is quite different.

Joffm

And to add:

To identify the really relevant options

Usually in market research we ask this second question as single question.
Q1. Which vegetables have you eaten this year? - multiple
Q2. Which did you like most? - single

If you allow multiple mentions in Q2 you should at least limit the number of allowed selections (the question is "liked most")
It is easier to select one or two items then to deselect 7 or 8

Just to consider
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 months 1 week ago by Joffm.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose