<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Deleting Duplicate Records in FileMaker</title>
	<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/</link>
	<description>smart business solutions</description>
	<pubDate>Thu, 04 Dec 2008 21:57:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: DaveMill</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1375</link>
		<dc:creator>DaveMill</dc:creator>
		<pubDate>Sun, 23 Nov 2008 21:52:27 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1375</guid>
		<description>Hi, all,

I've been playing around with the built-in ! operator in find mode, which finds all records with non-unique values in a field. 

If I create a calculation field to concatenate multiple fields, I can use the ! operator to find non-unique values in multiple fields. 

And since my databases (and I suspect those of many of you) are so complex, I don't want to let a script automatically delete first, last or any other  duplicate value. I need to make that decision myself.

So my deduplicate solution is to use the ! operator, sort the results, then click a check box field to identify records I want to delete. This works great for me.

Later!</description>
		<content:encoded><![CDATA[<p>Hi, all,</p>
<p>I&#8217;ve been playing around with the built-in ! operator in find mode, which finds all records with non-unique values in a field. </p>
<p>If I create a calculation field to concatenate multiple fields, I can use the ! operator to find non-unique values in multiple fields. </p>
<p>And since my databases (and I suspect those of many of you) are so complex, I don&#8217;t want to let a script automatically delete first, last or any other  duplicate value. I need to make that decision myself.</p>
<p>So my deduplicate solution is to use the ! operator, sort the results, then click a check box field to identify records I want to delete. This works great for me.</p>
<p>Later!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Søren Dyhr</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1027</link>
		<dc:creator>Søren Dyhr</dc:creator>
		<pubDate>Mon, 05 May 2008 18:24:06 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1027</guid>
		<description>I've just learned that the approach showed here, not is most potent algoritm one could come up with, using the scriptmaker steps availiable.

Following script using a tecnique introdced to me by Agnès Barouh of Tic Tac:

[code]Sort Records [ Speci?ed Sort Order: Contacts::FistName; ascending 
Contacts::LastName; ascending 
Contacts::ZipCode; ascending ] 
[ Restore; No dialog ] 
Replace Field Contents [ Contacts::gStrainedList; Replace with calculation: Case( 
    Get( RecordNumber ) ? 1 and Contacts::FistName = $t and 
    Contacts::LastName = $u and Contacts::ZipCode = $w; 
    Let( $theIDs = $theIDs &#38; ¶ &#38; Contacts::RecordID; "" ); 
    Let( 
        [ 
            $t = Contacts::FistName; 
            $u = Contacts::LastName; 
            $w = Contacts::ZipCode 
        ]; 
        "" 
    ) 
) ] 
[ No dialog ] 
Set Field [ Contacts::gStrainedList; $theIDs ] 
Go to Related Record [ From table: “Contacts 2”; Using layout: “Contacts” (Contacts) ] [ Show only related records ] 
Delete All Records [ No dialog ] 
[/code]

--sd</description>
		<content:encoded><![CDATA[<p>I&#8217;ve just learned that the approach showed here, not is most potent algoritm one could come up with, using the scriptmaker steps availiable.</p>
<p>Following script using a tecnique introdced to me by Agnès Barouh of Tic Tac:</p>
<p>[code]Sort Records [ Speci?ed Sort Order: Contacts::FistName; ascending<br />
Contacts::LastName; ascending<br />
Contacts::ZipCode; ascending ]<br />
[ Restore; No dialog ]<br />
Replace Field Contents [ Contacts::gStrainedList; Replace with calculation: Case(<br />
    Get( RecordNumber ) ? 1 and Contacts::FistName = $t and<br />
    Contacts::LastName = $u and Contacts::ZipCode = $w;<br />
    Let( $theIDs = $theIDs &amp; ¶ &amp; Contacts::RecordID; &#8220;&#8221; );<br />
    Let(<br />
        [<br />
            $t = Contacts::FistName;<br />
            $u = Contacts::LastName;<br />
            $w = Contacts::ZipCode<br />
        ];<br />
        &#8220;&#8221;<br />
    )<br />
) ]<br />
[ No dialog ]<br />
Set Field [ Contacts::gStrainedList; $theIDs ]<br />
Go to Related Record [ From table: “Contacts 2”; Using layout: “Contacts” (Contacts) ] [ Show only related records ]<br />
Delete All Records [ No dialog ]<br />
[/code]</p>
<p>&#8211;sd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Antunes</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1004</link>
		<dc:creator>Jesse Antunes</dc:creator>
		<pubDate>Tue, 08 Apr 2008 16:29:22 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1004</guid>
		<description>@Javier:  I can see how it's a little bit confusing.  Just before that code block I switched my example to a more generic look.  So `duplicate_records` is the table occurrence that is used to determine if there is a duplicate record.  

So if you were looking at the first two examples, the fields you would check for are &lt;code&gt;Products_dup::ID&lt;/code&gt; or &lt;code&gt;Customers_dup::ID&lt;/code&gt;.  If you find a value in those fields, then you know you have a duplicate record and you can just delete it.</description>
		<content:encoded><![CDATA[<p>@Javier:  I can see how it&#8217;s a little bit confusing.  Just before that code block I switched my example to a more generic look.  So `duplicate_records` is the table occurrence that is used to determine if there is a duplicate record.  </p>
<p>So if you were looking at the first two examples, the fields you would check for are <code>Products_dup::ID</code> or <code>Customers_dup::ID</code>.  If you find a value in those fields, then you know you have a duplicate record and you can just delete it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier Miranda V.</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1003</link>
		<dc:creator>Javier Miranda V.</dc:creator>
		<pubDate>Tue, 08 Apr 2008 14:24:29 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-1003</guid>
		<description>The solution seems elegant since it doesn´t require the definition of new fields (except for the ID that almost every DB has already) but.... I don´t get one thing:

If[ Not IsEmpty( duplicate_records::ID ) ] 

What is duplicate_records? a table? relations can have a name? 
The tables in your example are named products and Products_dup, so the notation duplicate_records::ID don´t make sense to me).</description>
		<content:encoded><![CDATA[<p>The solution seems elegant since it doesn´t require the definition of new fields (except for the ID that almost every DB has already) but&#8230;. I don´t get one thing:</p>
<p>If[ Not IsEmpty( duplicate_records::ID ) ] </p>
<p>What is duplicate_records? a table? relations can have a name?<br />
The tables in your example are named products and Products_dup, so the notation duplicate_records::ID don´t make sense to me).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-888</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Sun, 02 Dec 2007 21:02:48 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-888</guid>
		<description>@dave: Switch to Find mode, put &lt;code&gt;!&lt;/code&gt; in the Last Name field, then sort by Last Name. The &lt;code&gt;!&lt;/code&gt; find operator finds all records with duplicates in that field.</description>
		<content:encoded><![CDATA[<p>@dave: Switch to Find mode, put <code>!</code> in the Last Name field, then sort by Last Name. The <code>!</code> find operator finds all records with duplicates in that field.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Bertram</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-887</link>
		<dc:creator>Dave Bertram</dc:creator>
		<pubDate>Sun, 02 Dec 2007 20:17:32 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-887</guid>
		<description>I just want to compare last names and selectively delete the ones I don't want.  Do I need a script or is there a feature, like in itunes that shows duplicate records ?</description>
		<content:encoded><![CDATA[<p>I just want to compare last names and selectively delete the ones I don&#8217;t want.  Do I need a script or is there a feature, like in itunes that shows duplicate records ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-681</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Sat, 06 Oct 2007 21:41:59 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-681</guid>
		<description>@Paul: That will work in many cases, but it has a pretty significant drawback. If you make your calculation field stored, you are effectively doubling the amount of data FileMaker has to store and manage. That can have a significant impact on backup systems, increase the cost of disk systems, and slow things down if you're dealing with a large database.

If you make the calculation unstored, then the search performance will be very poor in a medium-to-large table.

The method in this article will perform well on large tables, and although it might introduce some indexing overhead, the impact will be much less than a full duplication of all data.</description>
		<content:encoded><![CDATA[<p>@Paul: That will work in many cases, but it has a pretty significant drawback. If you make your calculation field stored, you are effectively doubling the amount of data FileMaker has to store and manage. That can have a significant impact on backup systems, increase the cost of disk systems, and slow things down if you&#8217;re dealing with a large database.</p>
<p>If you make the calculation unstored, then the search performance will be very poor in a medium-to-large table.</p>
<p>The method in this article will perform well on large tables, and although it might introduce some indexing overhead, the impact will be much less than a full duplication of all data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-677</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Sat, 06 Oct 2007 15:06:05 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-677</guid>
		<description>A duplicate record in my book is a record where ALL fields are identical to the original record (with the exception of the record number or record ID). If you want to remove duplicate records ALL fields have to be checked - save the ID field. You can do that by integrating the values of all fields (except record ID) of one record into one variable x - like a checksum over the record would do, and  then insert that value into a new "checksum" field created for the purpose:

x = field_1 &#38; field_2 ...field_n

Then sort all records based on the "checksum" field, so that identical records are next to each other.

Then simply compare the value of x of record 1 with the value of 
 x of record 2 - and if they are identical you can delete one of the two records.

If you have more than two duplicate records you simply run the script again - until the number of records stays constant.

As my Filemaker sadly does not allow me to export scripts I cannot show you the actual text of the script.</description>
		<content:encoded><![CDATA[<p>A duplicate record in my book is a record where ALL fields are identical to the original record (with the exception of the record number or record ID). If you want to remove duplicate records ALL fields have to be checked - save the ID field. You can do that by integrating the values of all fields (except record ID) of one record into one variable x - like a checksum over the record would do, and  then insert that value into a new &#8220;checksum&#8221; field created for the purpose:</p>
<p>x = field_1 &amp; field_2 &#8230;field_n</p>
<p>Then sort all records based on the &#8220;checksum&#8221; field, so that identical records are next to each other.</p>
<p>Then simply compare the value of x of record 1 with the value of<br />
 x of record 2 - and if they are identical you can delete one of the two records.</p>
<p>If you have more than two duplicate records you simply run the script again - until the number of records stays constant.</p>
<p>As my Filemaker sadly does not allow me to export scripts I cannot show you the actual text of the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik CayrÃ©</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-427</link>
		<dc:creator>Erik CayrÃ©</dc:creator>
		<pubDate>Thu, 23 Aug 2007 12:32:41 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-427</guid>
		<description>I just thought of a way to solve the orphaned related records problem:
Add a text field to the table where the dupes will be deleted, and populate it with the unique ids already present in the table's primary key field.
Then change all relationships from using the unique key field to using the new field. Everything will still be related exactly as before.

Now, in the find/delete dupes loop, just before deleting: add the key of  the record being deleted to the new key field of all self related records, separated by a newline.

The end result will be that after all dupes are gone, all records formerly related to any now deleted record, will now be related to the 'surviving' record effectively consolidating all related redords to the kept records...

Remember to add an auto-enter calc to the new key field which adds the real unique id, in case it is missing, so that the mechanism stays functional).

Hope this helps!</description>
		<content:encoded><![CDATA[<p>I just thought of a way to solve the orphaned related records problem:<br />
Add a text field to the table where the dupes will be deleted, and populate it with the unique ids already present in the table&#8217;s primary key field.<br />
Then change all relationships from using the unique key field to using the new field. Everything will still be related exactly as before.</p>
<p>Now, in the find/delete dupes loop, just before deleting: add the key of  the record being deleted to the new key field of all self related records, separated by a newline.</p>
<p>The end result will be that after all dupes are gone, all records formerly related to any now deleted record, will now be related to the &#8217;surviving&#8217; record effectively consolidating all related redords to the kept records&#8230;</p>
<p>Remember to add an auto-enter calc to the new key field which adds the real unique id, in case it is missing, so that the mechanism stays functional).</p>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-358</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Mon, 13 Aug 2007 17:56:05 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/deleting-duplicate-records-in-filemaker/#comment-358</guid>
		<description>@keriann: If you look closely, you'll see the &lt;code&gt;No Dialog&lt;/code&gt; option on the &lt;code&gt;Delete Record&lt;/code&gt; script step. That means that in FileMaker, when you select that script step, you should turn on its "Perform without dialog" option. This tells FileMaker not to show a dialog box before deleting the record. Hope this helps!</description>
		<content:encoded><![CDATA[<p>@keriann: If you look closely, you&#8217;ll see the <code>No Dialog</code> option on the <code>Delete Record</code> script step. That means that in FileMaker, when you select that script step, you should turn on its &#8220;Perform without dialog&#8221; option. This tells FileMaker not to show a dialog box before deleting the record. Hope this helps!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
