Welcome to the LimeSurvey Community Forum

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

Choose a mark from a multiple response list

  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 week 3 days ago #269789 by Mon2016
Please help us help you and fill where relevant:
Your LimeSurvey version:  Versión 5.6.42+231024
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)Hello Forum friends,

I want to ask for your valuable help since I can't find how to make a filter, maybe it is something simple but I am not a very expert in Limesurvey


I tell you that I am asking about regular visits to supermarkets, so I want to know which one you go to most frequently.

I have a list of 19 supermarkets but I am only interested in 7 (1, 2, 3, 5, 9, 12, 19) so my first question is to select the supermarkets that you visit regularly at least once a month (This question has multiple answers) call it P05

Then in my second question they select the supermarket that they visit most frequently if in the previous question they selected more than 1 supermarket. This is a single answer, let's call it P06

Here comes the moment where I cannot find a way to filter since IF THE MOST FREQUENT ONE IS ONE OF THOSE OF INTEREST, THE REST OF THE INTERVIEW WILL BE APPLIED ON THAT SELF-SERVICE BRAND.
IF NOT, THEN RANDOMLY CHOOSE SOME OF THE INTEREST THAT APPLY ACCORDING TO P05.


I did some calculations with some functions I found to be able to choose that brand randomly if it doesn't select one of interest, but I no longer know how to choose between P06 or P05.

I leave an export in Lss to see if anyone has any idea how it can be done

Thank you so much

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 3 days ago - 1 week 3 days ago #269790 by Joffm
Hi,
you use version 5.x.
On my laptop I have only version 6.x. installed; therefore I can't provide a lss export (you can't import it).

But: What did I do?
First I changed P06 to a list(radio) question.
Why this your complicated approach with a multiple question and all subquestions as exclusive (here "max.answers: 1" would have been sufficient)

Now a second group (GCalc) with all equations:
1: eqFirstBrand (is the "most frequently" brand one of the interesting brands)
{if(P06==1,"A",if(P06==2,"B",if(P06==3,"C",if(P06==5,"D",if(P06==9,"E",if(P06==12,"F",if(P06==19,"G","")))))))}
2. -  4. eqBrands, eqRand, eqBrand  as is
5. eqFinalBrand (if we already got the brand in eqFirstBrand, use this, else eqBrand)
{if(!is_empty(eqFirstBrand),eqFirstBrand,eqBrand)}
6. eqFinalBrandName  (Generate the name)
{if(eqFinalBrand=="A","Fresko",if(eqFinalBrand=="B","City Market",if(eqFinalBrand=="C","La Comer",if(eqFinalBrand=="D","Walmart Express (antes Superama)",if(eqFinalBrand=="E","H-E-B",if(eqFinalBrand=="F","Chedraui Selecto",if(eqFinalBrand=="G","AlSuper","")))))))}

Then you proceed in the third group with the survey.
How often would you say you go to {eqFinalBrandName}?

BTW: What is to happen, if the respondent doesn't select any of the interesting brands in P05?

Joffm

Maybe I can provide a lss of version 5.x. later

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

Please Log in to join the conversation.

  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 week 3 days ago #269791 by Mon2016
Replied by Mon2016 on topic Choose a mark from a multiple response list
Thank you very much Joffm,

I'll try to make these adjustments you've written and see if I can have any luck.

In Q05, if they do not mention a supermarket of interest, the survey ends for the participant.


Greetings
 

Please Log in to join the conversation.

  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 week 3 days ago #269792 by Mon2016
Replied by Mon2016 on topic Choose a mark from a multiple response list
Hello Joffm,

Sorry for the double message.

I want to thank you because I did what you helped me with and it works very well.

I forgot to answer your question about why I used the multiple response with exclusive options in Q06. It happens that in Q05 I have the option to "Others specify." What I did is that I added one more subquestion to capture the information of the others and in the radio option I did not find a way to filter that subquestion.


Thank you very much again for your great help. <3

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 3 days ago #269793 by Joffm
You can handle "Others" with the array filter.
As you know - identical codes - you have to use the code of the "other" option.

As said; later a lss

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

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 3 days ago #269797 by Joffm
And here the promised lss. (with the second question as list(radio))
 

File Attachment:

File Name: limesurvey...79_J.lss
File Size:79 KB


1. None of the brands of interest is "most frequently"
 
 

2. One of the brands of interest is "most frequently"
 


And an addition.
You can't have the "calculation" equations in the same group as P05.
What happens?
At the start of the survey - nothing selected in P05 - the equation generates a random number from 1 - 0.
Now there are stores selected.
But this random number will never change - because of the construct (if(is_empty(eqRand),...
And if you only use "rand(1,strlen(eqBrands))" the random number will be changed with each new selection.
Therefore it's important to have the calculation in a separate group.

Joffm

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

Please Log in to join the conversation.

  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 week 3 days ago #269804 by Mon2016
Replied by Mon2016 on topic Choose a mark from a multiple response list
Thank you very much Joffm, it helps me a lot with this.

I send you many greetings.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose