1
0
-1

Hi,

 

Is there any way to validate a text field to prevent the same entry from being entered into the database for the second time?

For example:

 

PO Number: ________

if PO number 123 has been previously entered, the user should get a prompt that that PO number already exists and cannot be entered again.

 

Thanks

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0
      1. John Smith

        I'm trying to make it check the field value in the database rather than it coming from another form.

      2. Ashutosh Tripathi

        It'd be the same thing. Let me explain, say you have a form1 with a field with ID field1 on which you want the duplicate value validator to work. So, you'd need to configure the field1 to use a duplicate value validator configured to use the same form form1 and the same field field1. By doing this, you would create a check that once the form is submitted with value val1, the same field cannot be assigned val1 on resubmission. Let me know if you need more clarification.

      3. John Smith

        Thanks a lot for the clarification. Just tested it and it works now.

      4. Ashutosh Tripathi

        Glad that it helped. :)

      5. abdul Fattah

        okay how about if this in different table ? how can i use this validator Ashutosh Tripathi ?

      CommentAdd your comment...