- Posts: 33
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
A quota that screens out respondents with the same asnwers (case insensitive)
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
2 years 6 months ago - 2 years 6 months ago #220473
by almashah
A quota that screens out respondents with the same asnwers (case insensitive) was created by almashah
Hello all and thank you in advance for your replies.
I would like to put a screening out question:
The questions is: what is your last name?
The question is to screen out replicate answers (to keep only one unique answer per family/las tname)
if a respondent answers the question as: John and then a second respondent answers it with (John) then the second respondent will be terminated.
Please teach me how to do that.
Best regards
Almashah
I would like to put a screening out question:
The questions is: what is your last name?
The question is to screen out replicate answers (to keep only one unique answer per family/las tname)
if a respondent answers the question as: John and then a second respondent answers it with (John) then the second respondent will be terminated.
Please teach me how to do that.
Best regards
Almashah
Last edit: 2 years 6 months ago by almashah.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
2 years 6 months ago #220474
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 A quota that screens out respondents with the same asnwers (case insensitive)
I don't think this is possible in Limesurvey, at least not out of the box.
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.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12930
- Thank you received: 3978
2 years 6 months ago #220476
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic A quota that screens out respondents with the same asnwers (case insensitive)
And how do you imagine this to work?
If one respondent answers the question "Your lastname" with "Miller"
Why shouldn't another respondent also answer this question with "Miller"?
There is more than one family named "Miller".
On the other side. If the wife has a different last name as the husband (as in most spanish speaking countries) you get two different names, but the same family.
In my opinion you should think over your approach.
Joffm
It could be done by an ajax call.
Either by using direct access to the database or by the API.
If one respondent answers the question "Your lastname" with "Miller"
Why shouldn't another respondent also answer this question with "Miller"?
There is more than one family named "Miller".
On the other side. If the wife has a different last name as the husband (as in most spanish speaking countries) you get two different names, but the same family.
In my opinion you should think over your approach.
Joffm
It could be done by an ajax call.
Either by using direct access to the database or by the API.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13645
- Thank you received: 2491
2 years 6 months ago #220491
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic A quota that screens out respondents with the same asnwers (case insensitive)
Hey guys !
Remind core plugins : github.com/LimeSurvey/LimeSurvey/blob/72...untFunctions.php#L27
Then if you use LimeSurey 5.X and up
1. Activate plugin
2. Put statCount(self.sgq) < 1 in validation : manual.limesurvey.org/Question_type_-_Sh...28em_validation_q.29
3. Top can be : this name was already used and submitted.
Remind with not submitted, you must use statCount(self.sgq, 1) < 2 (because current one is not submitted).
Remind core plugins : github.com/LimeSurvey/LimeSurvey/blob/72...untFunctions.php#L27
Then if you use LimeSurey 5.X and up
1. Activate plugin
2. Put statCount(self.sgq) < 1 in validation : manual.limesurvey.org/Question_type_-_Sh...28em_validation_q.29
3. Top can be : this name was already used and submitted.
Remind with not submitted, you must use statCount(self.sgq, 1) < 2 (because current one is not submitted).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
2 years 6 months ago #220497
by almashah
Replied by almashah on topic A quota that screens out respondents with the same asnwers (case insensitive)
Last name is an example to what I'm trying to do in the quote (it is a tribal society with different paradigm not comparable to the western society). I agree that it won't 100% prevent replicates but at least it would be valid for a good extent.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12930
- Thank you received: 3978
2 years 6 months ago #220503
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic A quota that screens out respondents with the same asnwers (case insensitive)
@Denis,
thanks for reminding me
I am still not very aware of "statCount" as I use 3.x for production.
@almashah,
do not provide examples that are different.
So you have a text question and want to compare? Are you really sure that people use the same spelling?
Can you provide examples of what you expect as answers?
Joffm
thanks for reminding me
I am still not very aware of "statCount" as I use 3.x for production.
@almashah,
do not provide examples that are different.
So you have a text question and want to compare? Are you really sure that people use the same spelling?
Can you provide examples of what you expect as answers?
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
2 years 6 months ago #220636
by almashah
Replied by almashah on topic A quota that screens out respondents with the same asnwers (case insensitive)
Thank you Joffm:
1. I am expecting that most people will use their full last last name, however still some of them may use abbreviations.
2. I can not list all the last names as they may be around 7000 to 10000 names.
3. I am trying to screen out replicates as much as I can. Yet, it's fair to expect a few replicates.
It is a text type of question, but I don't have a list of all the last names.
1. I am expecting that most people will use their full last last name, however still some of them may use abbreviations.
2. I can not list all the last names as they may be around 7000 to 10000 names.
3. I am trying to screen out replicates as much as I can. Yet, it's fair to expect a few replicates.
It is a text type of question, but I don't have a list of all the last names.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13645
- Thank you received: 2491
2 years 6 months ago - 2 years 6 months ago #220637
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic A quota that screens out respondents with the same asnwers (case insensitive)
You are on 5.X or can update or not ?
If yes : use manual.limesurvey.org/StatFunctions
If not : use ajax system : inpiration : gitlab.com/SondagesPro/QuestionSettingsType/answerUnicity (really not clean, can be easily disable without JS)
If yes : use manual.limesurvey.org/StatFunctions
If not : use ajax system : inpiration : gitlab.com/SondagesPro/QuestionSettingsType/answerUnicity (really not clean, can be easily disable without JS)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 2 years 6 months ago by DenisChenu.
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
2 years 6 months ago #220638
by almashah
Replied by almashah on topic A quota that screens out respondents with the same asnwers (case insensitive)
I am using the online lime survey through my university (Version 3.27). I am downloading the lime survey 5.14 now and I'll try to export the survey and reopen it on the newest version. I'll let you know how it will go.
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
2 years 6 months ago #220639
by almashah
Replied by almashah on topic A quota that screens out respondents with the same asnwers (case insensitive)
Okay it seems that I have to do the second option,but I have zero experience with Java script is there a way to help me with this ?
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12930
- Thank you received: 3978
2 years 6 months ago #220649
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic A quota that screens out respondents with the same asnwers (case insensitive)
If you have work on 5.x. it is really easy.
And without any javascript.
1. question (Q1) (short text): "Please, enter your name"
2. question (eqName) (equation): {statCountIf(Q1.sgqa,Q1)}
You will get a value of "0", if the name was not entered before.
Now you may set a quota on this equation to screen out all respondents with a value >0.
Now a small problem.
The quota doesn't work with this comparison ">0".
So change the equation to
2. question (eqName) (equation): {if(statCountIf(Q1.sgqa,Q1)>0,1,0)}
and you set the quota to
You have to decide, if you will wait till a respondent submits the questionnaire or not.
If you wait till he submits, then it is possible that - while the first answers the questionnaire - a second with the same name is allowed to enter.
But anyway: "Miller", "Miller ", "MILLER" are different names.
You may convert the names to uppercase and trim them to avoid this.
Joffm
And without any javascript.
1. question (Q1) (short text): "Please, enter your name"
2. question (eqName) (equation): {statCountIf(Q1.sgqa,Q1)}
You will get a value of "0", if the name was not entered before.
Now you may set a quota on this equation to screen out all respondents with a value >0.
Now a small problem.
The quota doesn't work with this comparison ">0".
So change the equation to
2. question (eqName) (equation): {if(statCountIf(Q1.sgqa,Q1)>0,1,0)}
and you set the quota to
You have to decide, if you will wait till a respondent submits the questionnaire or not.
If you wait till he submits, then it is possible that - while the first answers the questionnaire - a second with the same name is allowed to enter.
But anyway: "Miller", "Miller ", "MILLER" are different names.
You may convert the names to uppercase and trim them to avoid this.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13645
- Thank you received: 2491
2 years 6 months ago #220655
by DenisChenu
Great
About uppercase , a possible solution with quota on expression (i don't remind we have this …)
Question Q1UpperCase with equation {uppercase(Q1.NAOK)}
Maybe it can work ?
You can remove space and - etc … too : Jean Michel == Jean-Michel
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic A quota that screens out respondents with the same asnwers (case insensitive)
Thnak you for testing Joffm !But anyway: "Miller", "Miller ", "MILLER" are different names.
You may convert the names to uppercase and trim them to avoid this.
Great
About uppercase , a possible solution with quota on expression (i don't remind we have this …)
Question Q1UpperCase with equation {uppercase(Q1.NAOK)}
Maybe it can work ?
You can remove space and - etc … too : Jean Michel == Jean-Michel
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.