May 15, 201312 yr Hello, I'm using a script originating from the Filmaker website that is suppose to do exactly what I need: http://help.filemaker.com/app/answers/detail/a_id/3441/kw/finding%20duplicate%20records Show All Records Sort Records [specify sort order, Perform without dialog] Sort by Client ID in ascending order Go to Record/Request/Page [First] Replace Field Contents [Perform without dialog, Specify target field 'Mark', " "] Loop Set Variable[$id,'ClientID'] Go to Record/Request/Page [Next, Exit after last] If ['$id = ClientID'] Set Field ['Mark', '"X"'] Else Set Variable[$id,'ClientID'] End If End Loop Perform Find [Restore] Find records when Mark = X The attachment is what I have in my database: The script will not write an X as it goes through the list (~123000 records). I've used the debugger to 'step into' the lines and I can see the duplicate clientID's but it just jumps through leaving no "X" in the cell .... It's 'showing' and 'sorting' correctly .... any thoughts on if this is a mistake or what I could do differently? Thanks very much! Lance fmp script issue.tiff
May 15, 201312 yr Your script looks ok. make sure the field has the correct type in it... ie... if its a number field and it has text or non number characters in it, your sort will not be correct... can you confirm your sort is ok
May 15, 201312 yr Author The field contains a number and it is set to 'number' .... the sort appears correct: you see the duplicates together ... it's just the writing "X" in the "Mark" field that's not happening ....
May 15, 201312 yr Author So I checked the "Mark" field and it is not 'text' ... so I changed that and discovered something: When the script runs it results in all the doubled fields showing an "X" ... that way you can delete them ... I was expecting JUST the second field to be "X" and the all the fields still visually there ... so it appears that it's working now. Thanks very much for the heads up around field type etc. L.
May 16, 201312 yr Take a look at the relationship graph note.. maybe this will be useful duplicates.zip
May 16, 201312 yr Your eleventh row is wrong, you forgot ::Mark; "X"] bye Edited May 16, 201312 yr by Lee Smith Please do not use all caps, it's considered shouting
Create an account or sign in to comment