Different approaches to doing this...
One is with SQL and a GROUP BY. I don't if you want a count in the table set, but an option would be
ExecuteSQL ( "SELECT Flt_num, count ( Flt_num ), Route, CI_Loc_Time, CO_Loc_Time, Block FROM Data_Import GROUP BY Flt_num, Route, CI_Loc_Time, CO_Loc_Time, Block " ; "" ; "" )
You can determine the "distinctness" or uniqueness by removing or adding columns/fields to the GROUP BY
In the old days (before FileMaker used SQL) we used to make a calculated field with the fields concatenated and then do a summary on that.
Depending on what you want to do with the data, other options might be better...
rrritchie has given you two good options. Another would be a self-joining relationship that uses all the match fields as predicates. IOW, use Flt_num, Route, CI_Loc_Time, CO_Loc_Time, and Block all as match fields. Then, you can just see how many records exist on the other side of the relationship. If it's more than one, you have a duplicate.
If you need to select only unique records based upon your criteria and work with them, the easiest method is the old one that rrrichie mentions: create a composite key in a calculation field, build a self relationship on it, create a zz_I_am_dup_record field calculated as pk ≠ relationship ::pk and find all records that have 0 in this field. They are your found set and you can do whatever you wish with them.
create a composite key in a calculation field, build a self relationship on it, create a zz_I_am_dup_record field calculated as pk ≠ relationship ::pk and find all records that have 0 in this field.
I don't think that's working, since you're only looking at the first related record.
You could throw in a IsEmpty ( FilterValues ( List ( relationship ::pk ) ; pk ) ), but I think an easier way is to use a relationship that encodes your calculation expression, then check for related records …
cFingerPrint = selfCheck::cFingerPrint
primaryKey ≠ selfCheck::primaryKey
matches only on same fingerprint in different records
A calc field cIsUnique: IsEmpty ( selfCheck::primaryKey )
evaluates to True if the record's fingerprint is unique (since even a single match would make it a duplicate).
Search that field for 1.
1. Your approach finds a single instance for each group of multiples – which, on re-reading, seems to be what the OP wanted … So sorry for muddying the waters.
My approach will find records that are “truly” unique, which I misread as the required functionality.
Then think different !
2. Me seems that the word you wanted to write in bold is “different”, not “think” …
Thank you all for taking the time to help me out. I'm in the process of trying the solutions you've offered, (so far the 'composite key' and summary works, it's into SQL and GROUP BY next). I was staring at the screen and now I'm motoring ahead! Have a great day. Dom