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

Question about duplicate records

Featured Replies

For whatever reason I still run into issues with duplicate records every so often. My question is, if I get an error message saying one of my offline users on an iPad has a duplicate record and I go in and change the primary key to something different in my online database, will mirrorsync update that record for the offline user during the sync, thereby clearing the duplicate? Or will it skip that table completely when it detects the duplicate in the offline database?

 

Thanks.

The latter - it will not attempt to sync any table that has duplicate primary keys.

Are you using MirrorSync-managed or developer-managed keys?

  • Author

Thanks Jesse, that is what I figured - darn.

 

I am using MirrorSync managed keys. Its weird because this table rarely ever has anything written or deleted in it - its data that is referenced but barely ever changed so no idea how it got a duplicate entry. Thanks for the quick reply. 

Are there any scripted imports in your solution?

With MirrorSync-managed keys, MirrorSync never writes to the primary key at all - it just uses whatever auto-enter values FileMaker assigns.

  • Author

Yep there are, I have a script I run every time I send out a new version that exports and imports all the data. Could that confuse mirrorsync possibly when that happens? I am always sure to set the primary key "next value". Basically I import the records table by table, then sort them and get the highest primary key, then add 1000 to it to make sure to account for any possible offline records that might not have been synced yet, and I set that as the new "next primary key". 

My guess is that something with that scripted import is leading to duplicate serial numbers. I doubt that MirrorSync is involved at all, but if you want to be 100% certain, you can create a calculated field equal to the primary key, and use that as your MirrorSync serial number. That way, MirrorSync can't possible overwrite the primary key with another value.

  • Author

Ok I may try that. I was also thinking about adding in a quick find check after my import to make sure there are no duplicates and throw and error if there are. Thanks for your help. 

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.