Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FileMaker Topics / May 2004

Tip: Looking for answers? Try searching our database.

Duplicate records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Falcon - 28 May 2004 18:49 GMT
Is there an easy way to create a script that will check for duplicates
records?

It would need to compare at least 2/3 fields to get a unique cross match!

Thanks
niss@nisse.se - 28 May 2004 19:25 GMT
> Is there an easy way to create a script that will check for duplicates
> records?
>
> It would need to compare at least 2/3 fields to get a unique cross match!
>
> Thanks

First you must have an VAR field to store "something" to compare.

Next you need an calc value to store the "key".

Last you need an filed to store if it's unique or not

The script: ;-)

SHOW all values.
GOTO first record
STORE the the "Key" into "VAR"
LOOP
 goto next record (EXIT after all)
 IF KEY=VAR then set unique to FALSE ELSE set unique to TRUE
ENDLOOP
FIND NOT unique
IF FIND# >= 1 THEN DELETE find records ELSE "DO NOTING"
SHOW all values.
AL Lawrance - 28 May 2004 20:10 GMT
Another way is to create a self join relationship based on a concatenation
of First Name& Last Name & ZIP (call it Duplicate) or some other unique
combination then do a count calculation stored in the field Duplicate_Count
( formula is:  Count(<Filename>::Duplicate) ).

Now create a calculated field called Duplicate_Result and enter the unstored
formula:

 If  (Duplicate_Count>1 then "Duplicate","Original").  This means all
duplicate records will have the word duplicate in this calculated field.
From there it is easy ... just do a find for the word "duplicate and only
the duplicate records will display (do it in LIST or TABLE view mode).

Also, when creating new records, if the field Duplicate_Result is on a
layout as a Merge field then it will display "Original" when the record is
created unless a duplicate(s) exist (once all data in key calculated field
are entered) ... then it will display "Duplicate".  This way, the data entry
operator can see immediately that they have created a duplicate record and
take corrective action before destroying the data integrity in related
records  (i.e., FIND duplicates, verify that records arre in fact the same
and delete the record which was created last).

Later,

Signature

Al Lawrance
British Columbia
CANADA
--------------------------------------
ajlawrance@shaw.ca
http://www.members.shaw.ca/ajlawrance/

> Is there an easy way to create a script that will check for duplicates
> records?
>
> It would need to compare at least 2/3 fields to get a unique cross match!
>
> Thanks
Falcon - 29 May 2004 17:16 GMT
Nearly their with this one but not quite!

I have created a field called DUPLICATE, its a calculation with a text
result:

Options= Unstored, = Title First & First Name First & Last Name First

So far so good, no problems here!

Next Field

Duplicate_Count, its a calculation field with a number result:

Options= Unstored, =Count(DUPLICATE)

Next Field

Duplicate_Result, it's a calculation with a text result

Options= Unstored, =If(Duplicate_Count>1, "Duplicate","Original"

Ok the unique string works fine but I only get a result of 1 for number of
records!

Any suggestions!
AL Lawrance - 29 May 2004 18:24 GMT
You have to make a SELF-JOIN relationship of the file to itself based on the
unique DIPLICATE field calculation anf then do the COUNT based on that
relationship.

> Nearly their with this one but not quite!
>
[quoted text clipped - 21 lines]
>
> Any suggestions!
Falcon - 29 May 2004 19:27 GMT
Sorry I don't understand.

My records are both in the same database, do you mean "Define Relationship"?

If so I tried that and tried to define a relationship between:

DUPLICATE & ????

but I could not scroll down any further to select a field relating to this!

Any suggestions and thanks for your help!
Howard Schlossberg - 29 May 2004 20:06 GMT
> My records are both in the same database, do you mean "Define Relationship"?
>
> If so I tried that and tried to define a relationship between:
>
> DUPLICATE & ????

Between Duplicate and SelfRelated::Duplicate

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California
Associate Member, FileMaker Solutions Alliance
Falcon - 29 May 2004 20:31 GMT
Thanks Howard & AL Lawrence!

Got there in the end!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.