Welcome to the LimeSurvey Community Forum

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

One quota working the other is not despite being the same structure

  • manderley
  • manderley's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 4 days ago #252497 by manderley
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.22.11+200330

==================
Hi!

I'm trying to set up some quotas for my survey but some of them are not working and I can't seem to figure out why.

My survey is set so that each question shows on a new page.

My goal is to have quotas that filter out people based on gender, age and highest education. The gender (Z1) and the education (Z3) are radio questions, the age (Z2) is a drop down question.
I'm using an equation to compute the age and gender together like this: idosferfi=if(Z1==1 && Z2>44,"1"). (so males over 44 years get a "1")
I also have one for females older than 29 like this: idosno= if(Z1==2 && Z2>29,"1")
The reason for the equation is so that I dont have to manually add every single age above 44 or above 29 to the quota.
The equations are hidden since the participants should not see them, but I tried to make them visible and that does not seem to change the outcome.

My quota is linked to those equations and the question about the education. My goal is to not let anyone through that are over 29/44 and not in the correct education level so I created a quota with the limit being 0.

The equations work fine, the men above 44 get the "1" in idosferfi and women over 29 get the "1" in idosno as they are supposed to.
The quota is also counting them correctly and in one case it closes as it is supposed to but in the other case it does not.


If none of them worked I would assume it's because of the equation or the hidden questions or something, but I can't seem to figure out why one is working and a fairly similar one is not. Whether the questions are hidden or not does not matter and I have also tried to put them in different order. Every time the same one is working and the other is not.

Any ideas on what could cause this? Is it a bug or am I missing something?

Or if you have a different solution for not having to add all ages one by one to the quota I would appreciate that too. We are using these regularly so it would save time and effort if we had a shortcut like this.

Thanks in advance.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 4 days ago #252498 by Joffm
Probably you miss something, but we have to see what exactly you do.
Send the lss export (only the relevant questions)

Joffm

​​​​

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

Please Log in to join the conversation.

  • manderley
  • manderley's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 4 days ago #252499 by manderley
There you go.
 

File Attachment:

File Name: limesurvey...6616.lss
File Size:44 KB


I hope you are able to determine where I went wrong, it would be a huge help.
Thanks

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 4 days ago #252501 by Joffm
Hi,
I revised your equations.
To create a new variable you only have to enter the statement
The variable is stored as [questioncode]
Meaning:
If you create a question "MaleOld" you only enter
{if(Z1==1 and Z2>65,1,0)}
You use the assignment operator to assign the value to another question, like
{QX=if(Q1==1 and Q2>4,1,2)}
Here you set the value of question QX either to 1 or 2, depending on Q1 and Q2.
 
And odf you use numbers, USE numbers, not text.
"1" is a text
1 is a number

Though I did not understand your quota - you want to exclude "old men with education higher "Általános iskola"?
I created it like this. But this you may adapt easily.
 

File Attachment:

File Name: limesurvey...6161.lss
File Size:45 KB


Joffm
 

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

Please Log in to join the conversation.

  • manderley
  • manderley's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 4 days ago #252536 by manderley
Hi Joffm!

Thank you for the quick and efficient answer. It works like a charm.
You understood the quota perfectly, my goal is to exclude people who are above a certain age and also have an education higher than "Általános iskola".

Thanks :)
 

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose