Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

CRC calculation per record possible? (Continued from threa..

 
   Database Help (Home) -> FileMaker RSS
Next:  Time Calculation  
Author Message
Christoph Bouthill

External


Since: Jul 01, 2003
Posts: 21



(Msg. 1) Posted: Wed Dec 31, 2008 5:25 pm
Post subject: CRC calculation per record possible? (Continued from thread of 6 Nov. 2008) (Duplicate checking)
Archived from groups: comp>databases>filemaker (more info?)

Dear Listeners,

On 6 Nov. 2008 I had asked the group whether somebody knew a solution to
check records which contain a field with a long string (160 or even 260
bytes) for duplicate entries. I need(ed) to find even the slightest
difference amongst bank account records downloaded from a telebanking site.
There were several contributions (MD5, Plugins) - thanks for that input so
far.

A few days ago I started tinkering on that issue again and found another way
to tackle it - it turned out to be surprisingly simple!

Using plain FMP 6 I did the following:

--

Create 2 global fields, type text:

g.comparison.1

g.comparison.2

--



Create a text field:

t.duplicate.marker

--

Create a calc field:

c.compare.comparison.1.with.comparison.2

with the following formula:

Case(

Left(g.comparison.1;20)
=
Left(g. comparison.2;20)

and

Middle(g. comparison.1;21;20)
=

Middle(g. comparison.2;21;20)

and

[and so forth...]

Middle(g. comparison.1;241;20)
=
Middle(g. comparison.2;241;20)

;
"Duplicate!";

""
)

--

Create a script:

Sort [Restore, No dialog]

Replace Contents [No dialog, "t.duplicate.marker", """"]

Go to Record/Request/Page [First]

Loop

Exit Loop If ["Status(CurrentRecordNumber)=Status(CurrentFoundCount) "]

Set Field ["g.comparison.1", "Substitute(--here a text concatenation of all
fields to be compared--;" ";"")"]

#Comment: Substitute is used to shorten the string as much as possible.

Go to Record/Request/Page [Next]

Set Field ["g.comparison.2", "Substitute(--here a text concatenation of all
fields to be compared--;" ";"")"]

If ["c.compare.comparison.1.with.comparison.2="Duplicate!""]

Set Field ["t.duplicate.marker", ""Attention! Duplicate!""]

End If

End Loop

--

Even with a field length of 260 (normally the maximum in FMP 6 would be 60)
the comparison works flawlessly and quite fast - approx. 900 records/second
on a 2.4 GHz Win XP machine.

--
Met vriendelijke groet / Mit freundlichen Gruessen / With kind regards
Christoph Bouthillier
p o s t <<a t>> oh-no-spam t e k s t o t a a l << d o t >> c o m
Forget the oh-no-spam

 >> Stay informed about: CRC calculation per record possible? (Continued from threa.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Calculation Field Comparing Calculation Fields? - Either FMP8 does not allow a Calculation Field to compare to another Calculation Field, or perhaps there is a nifty trick to do so? I've tried 'IF' and 'CASE' functions to no avail. Field 1 = TextA Field 2 = TextB Field 3 = Text C (This is actully..

calculation - I have a calculation joining data from 2 fields so that I have 2 spaces followed by - followed by 2 spaces between the data from the 2 fields. How can I set it up so that the joining device is only shown if there is data in both fields? For example:....

Help for a calculation - Dear Filemakers, I would need help for a calculation to separate a full name (from another database) in last, first and middle name (three fields then). Example: I retrieve the name Lange, Nelly M. (the formatting of the name with commas and dots is....

TEXT CALCULATION - I have 3 fields, city, state, zip. I want to build a calc that will place City and State and Zip all together, but I want City in (proper) format and State in (All Caps) plus the zip Thanks JC

Date calculation - I'm a relatively new user to FMPro, and am making a new field that will perform a calculation based on a date. All I want it to do it read the content of the "Record Creation date" field, and add a number to it (a number of days). I'd like to t...
   Database Help (Home) -> FileMaker All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]