Welcome to the LimeSurvey Community Forum

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

Prevent filling a field with a value that someone has already filled in.

  • carloscalla
  • carloscalla's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago #232794 by carloscalla
Prevent filling a field with a value that someone has already filled in (prevent repeated responses)

Greetings, Please, how I can validate a field, that is, a survey fills out, for example a phone number, and if another person fills out the same survey and puts the same phone number, prevents you from filling it out or sending an alert (personalized message) that phone (has already been registered previously.


Thank you very much for your reply.

Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #232799 by Joffm
Hi,
you did not answer the initial questions.
So this answer may not apply.

You can use the function "statCountIf" in a question of type equation like
 {statCountIf(Q1.sgqa, "="+Q1)}
to count the number of already given entries in Q1 equal to the actual entry.
Screen out if the number is already greater than 0..

Joffm

Joffm

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

Please Log in to join the conversation.

  • carloscalla
  • carloscalla's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago - 1 year 6 months ago #232808 by carloscalla
[img]blob:https://maestro21edupe-my.sharepoint.com/a4774a78-f32f-4c35-b0a2-b3bfeb367613[/img]Show error at the function StatCountif

Gracias
Last edit: 1 year 6 months ago by carloscalla.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago - 1 year 6 months ago #232809 by Joffm
Edit: Okay, you saw your mistake.
This is not an equation to validate the question.
Read the manual about question validation and subquestion validation
[url] manual.limesurvey.org/Question_type_-_Sh...28em_validation_q.29 [/url]
or study the demo surveys about this.
[url] manual.limesurvey.org/ExpressionScript_s...Validation_Equations [/url]

Create a new question of type equation where you insert the formula.to store the number and to use this to proceed according to your wishes.

Joffm

BTW:
A validation equation is a logical term (either TRUE or FALSE).
So you may use
 statCountIf(Q1.sgqa, "="+Q1)==0
But I do not see a sense in it. You force a number that was not entered before.
But what do you do if the respondent doesn't have a different one?
 

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

Please Log in to join the conversation.

  • carloscalla
  • carloscalla's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago #232810 by carloscalla
I'm sorry Sir, and yes, the plugin it`s active.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose