A quota that screens out respondents with the same asnwers (case insensitive)

More
2 months 2 days ago - 2 months 2 days ago #220473 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
Last edit: 2 months 2 days ago by almashah.

Please Log in to join the conversation.

More
2 months 2 days ago #220474 by holch
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.

Please Log in to join the conversation.

More
2 months 2 days ago #220476 by Joffm
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.
 


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

Please Log in to join the conversation.

More
2 months 2 days ago #220491 by DenisChenu
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).

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.

Please Log in to join the conversation.

More
2 months 2 days ago #220497 by almashah
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.

Please Log in to join the conversation.

More
2 months 2 days ago #220503 by Joffm
@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
 


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

Please Log in to join the conversation.

More
1 month 4 weeks ago #220636 by almashah
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.

Please Log in to join the conversation.

More
1 month 4 weeks ago - 1 month 4 weeks ago #220637 by DenisChenu
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)

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: 1 month 4 weeks ago by DenisChenu.

Please Log in to join the conversation.

More
1 month 4 weeks ago #220638 by almashah
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.

Please Log in to join the conversation.

More
1 month 4 weeks ago #220639 by almashah
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 ?

Please Log in to join the conversation.

More
1 month 4 weeks ago #220649 by Joffm
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


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

Please Log in to join the conversation.

More
1 month 4 weeks ago #220655 by DenisChenu

But anyway: "Miller", "Miller ", "MILLER" are different names.
You may convert the names to uppercase and trim them to avoid this.

 

Thnak you for testing Joffm !
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.

Please Log in to join the conversation.

More
1 month 4 weeks ago #220667 by almashah
Thank you for your help. It seems that I can not have the vresion 5.14 and the only version that I have is 3.x. Any advice on how to tailor the javascript to solve the problem?

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now