Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Finding Duplicates script not working ....

Featured Replies

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

  1.  

 

fmp script issue.tiff

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

  • 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 ....

  • 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.

Take a look at the relationship graph note.. maybe this will be useful

duplicates.zip

Your eleventh row is wrong, you forgot ::Mark; "X"]

 

bye

Edited by Lee Smith
Please do not use all caps, it's considered shouting

  • 2 weeks later...
  • Author

Thanks!  Done :)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.