Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3349 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

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

  • Like 1
Posted

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. 

Posted

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.

  • Like 1
Posted

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

Posted

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.

Posted

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. 

This topic is 3349 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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