1 (edited by denzkie1191 2020-03-18 14:20:06)

Topic: Duplication of Entry

Just wanna ask if there's a way to prevent duplication of entry?

i'm making a data entry system and i noticed that if you enter a same data it will duplicate, pls see my screenshot..

Post's attachments

Attachment icon Screenshot_1.png 19.48 kb, 270 downloads since 2020-03-18 

Re: Duplication of Entry

denzkie1191 wrote:

Just wanna ask if there's a way to prevent duplication of entry?

i'm making a data entry system and i noticed that if you enter a same data it will duplicate, pls see my screenshot..


if you need to optimize the database

Post's attachments

Attachment icon test.7z 3.73 kb, 535 downloads since 2020-03-18 

3 (edited by denzkie1191 2020-03-18 16:19:02)

Re: Duplication of Entry

sibprogsistem wrote:
denzkie1191 wrote:

Just wanna ask if there's a way to prevent duplication of entry?

i'm making a data entry system and i noticed that if you enter a same data it will duplicate, pls see my screenshot..


if you need to optimize the database

hello sir, i got the sample that you've made, can you pls. explain what is happening in your sample?
sorry sir i'm new to this application, i noticed u used script, but too bad for me sir i don't know how to code yet in this platform.
thank you for your effort sir.. i appreciated it.

Re: Duplication of Entry

Hi Denzkie, Sibprogsistem,
I don't think it's possible to check for duplicate entries without writing a script.  However, it needn't be complicated. 
Please see the attached as a simple duplicate check (there are other ways but they involve more lines of code);  there is a more detailed explanation in the script comments.
Shout out if anything's not clear and I'm sure someone will try and lend a hand.
Derek.

Post's attachments

Attachment icon duplicatecheck.zip 343.88 kb, 593 downloads since 2020-03-18 

Re: Duplication of Entry

denzkie1191 wrote:

hello sir, i got the sample that you've made, can you pls. explain what is happening in your sample?
sorry sir i'm new to this application, i noticed u used script, but too bad for me sir i don't know how to code yet in this platform.
thank you for your effort sir.. i appreciated it.

 

this script checks if such a name exists in the database, if it does not exist, then adds it, and if it exists, a new record is associated with it

Re: Duplication of Entry

denzkie1191,
Attached is another option. As you can see, MVD is very flexible in doing things in various ways. Not one is really any better than the other.

Post's attachments

Attachment icon Dup Check.zip 337.46 kb, 573 downloads since 2020-03-18 

Re: Duplication of Entry

derek wrote:

Hi Denzkie, Sibprogsistem,
I don't think it's possible to check for duplicate entries without writing a script.  However, it needn't be complicated. 
Please see the attached as a simple duplicate check (there are other ways but they involve more lines of code);  there is a more detailed explanation in the script comments.
Shout out if anything's not clear and I'm sure someone will try and lend a hand.
Derek.

thank you sir..

Re: Duplication of Entry

sibprogsistem wrote:
denzkie1191 wrote:

hello sir, i got the sample that you've made, can you pls. explain what is happening in your sample?
sorry sir i'm new to this application, i noticed u used script, but too bad for me sir i don't know how to code yet in this platform.
thank you for your effort sir.. i appreciated it.

 

this script checks if such a name exists in the database, if it does not exist, then adds it, and if it exists, a new record is associated with it

ow i see, thank you sir..

Re: Duplication of Entry

ehwagner wrote:

denzkie1191,
Attached is another option. As you can see, MVD is very flexible in doing things in various ways. Not one is really any better than the other.

thank you for helping me sir..

Re: Duplication of Entry

Dear Ehwagner. I  used yor application, added the fields "Address" and "City". Deletedmyour records en add two new records. So far all is well, but  changing an address is impossible, because the programm doesnot recognize that this is not adding a new record and displays the massagebox. Do you have a solution

11 (edited by ehwagner 2020-03-20 22:51:26)

Re: Duplication of Entry

kees.krause,
If you want to use my solution I updated the project and added address and then checked for a duplicate after making changes to a record. So if the user updates the fields and the result of the changes will produce a duplicate then present the duplicate error message otherwise it will save the changed data. If you do not want to use the address as part of the duplicate check, then remove it from the SQLEXECUTE statements and the Hold_Flds and FLD_Concat variables.

Post's attachments

Attachment icon Dup Check Revised.zip 339.19 kb, 534 downloads since 2020-03-20 

12 (edited by derek 2020-03-20 16:45:42)

Re: Duplication of Entry

Hi Kees, Hi EHW,
Duplicates - what a nightmare - LOL!
I've tried to cover all the options in the attachment (I'm only considering 'first name' and 'last name' duplicates (date of birth, city - anything - can be included but I didn't want to complicate the issue)).
So,
1.  a new record with the same first name and last name is a duplicate
2.  an existing record that has a date of birth and / or city added is saved as an existing record
3.  if an existing record changes the first name and last name to a first name and last name that doesn't already exist, this is saved as an existing record.
4.  if an existing record changes the first name and last name to a first name and last name that already exists, this is a duplicate.
As extra safeguards, there are checks for a mixture of upper and lower cases and for leading and trailing spaces (typically data entry errors).
Derek.

Post's attachments

Attachment icon duplicatecheck.zip 344.81 kb, 596 downloads since 2020-03-20 

13 (edited by kees.krause 2020-03-21 07:01:03)

Re: Duplication of Entry

Hello Derek and Ehwagner.

Both thanks for your reaction. For Ehwagner the changed project is enclosed. Derek is will study your project.

Post's attachments

Attachment icon duprecord1.zip 5.81 kb, 533 downloads since 2020-03-21 

Re: Duplication of Entry

kees.krause,
See my earlier post which includes a revised project (Dup Check Revised.zip)