Suha Posted September 3, 2015 Posted September 3, 2015 Can someone tell me what is wrong with this way to find duplicates. It worked with me for 1 table only and not working for others. Define a self-join relationship. A self-join is a relationship is a relationship where both match fields are defined in the same table. Use your chosen identifying field as the match field in both tables in the relationship. Drag that field on top of it's self. Name the relationship occurrence "Same". When you define a self-joining relationship in the relationships graph, FileMaker Pro generates a second occurrence of the table upon which you are basing the self-join. FileMaker Pro does this to prevent the relationships from forming a cycle, which would make it impossible to evaluate. The primary record is the first matching record according to the sort order defined in the relationship. Define two fields: - Counter, a text field with an auto-entered serial number (select Serial number and accept the default values for Next and Increment by).- Check Duplicates, a calculation field with a text result, with the formula:If (Counter = Same::Counter ; "Unique" ; "Duplicate") Choose Records menu > Show All Records. Click the new Counter field, choose Records menu > Replace Field Contents, and Replace with serial numbers. Again, accept the default values. Select Update serial number in Entry Options, and click Replace. This will assign a serial number to all existing records in your database. Serial numbers will automatically be entered in new records. Perform a find for Duplicate in the Check Duplicates field.
comment Posted September 3, 2015 Posted September 3, 2015 (edited) Can someone tell me what is wrong with this way to find duplicates. It worked with me for 1 table only and not working for others. There is nothing wrong with it (although better ways do exist). If it works in one table, but not in another, then the problem is not with the method. Either you have made a mistake in the implementation, or the data is not what you think it is. How exactly did you determine that it is "not working"? Hint: perform a find for ! in the field of interest. That will find all duplicate records (original and duplicate alike), and you can see if that matches your expectations. Edited September 3, 2015 by comment 1
Suha Posted September 4, 2015 Author Posted September 4, 2015 My fields have text as a unique value/ primary key in both tables. unfortunately, it is an old db that I can not change much in it and I have to deal with what in it. In the first table it tells where are the duplicates and unique values but in the second everything is unique. There are duplicates with 20 records and contains exact data.
Wim Decorte Posted September 4, 2015 Posted September 4, 2015 Not sure what you are saying here... in your approach you add a relationship, some fields, but then in your last post you say that you "can not change much" What Comment is saying is that your approach makes each entry look like unique but it clearly is not. Because clearly you can see duplicates. So the data you are seeing is not the data that is there. Could be trailing returns, leading or trailing invisible characters,...
Recommended Posts
This topic is 3380 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now