Jump to content
Server Maintenance This Week. ×

Duplicate records after sync


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

Recommended Posts

After my first sync, I now have duplicate records in all synced tables.

 

Question: in the setup guidelines, it says to update all records so there is data in the ES_Record_UUID field using Get(UUID).  It also says to do this on the mobile database setup... should the mobile database have different UUID's in this field than the hosted database?  Seems to me that these should line up so the sync knows which record to work with, otherwise it's going to think the record was newly added and create a new one (hence all the dupes).

 

I'm wondering if it would have been better to setup the hosted database first, then pull down a copy for offline and set that one up following the mobile guidelines.  That would mean all the ES_Record_UUID's would match from hosted to mobile in their respective tables.

 

Would that be the right approach?  The documentation was not clear and almost suggested not to do this by it's wording (which was just "repeat steps 1-4 for from the 'configuring the hosted database').

 

Any insight would be much appreciated.

 

Thanks,

 

Ethan


This is on FMS 13, FMA 13 and FMGo for 13.

Mavericks

iOS 7.1.2 on iPad Air

Link to comment
Share on other sites

Ethan --

 

You're correct - if you are pre-loading data into the mobile database, to avoid duplicate records, the ES_Record_UUIDs in the mobile database need to match the hosted database.

 

Sorry for the confusion. The documentation was originally written with the assumption that the mobile database would either be empty, or would have been populated with records from the host (with ES_Record_UUID values already assigned). I'm going to be updating the docs soon, and addressing the various "pre-loaded data" issues.

 

Let me know if you have any other questions.

 

-- Tim

Link to comment
Share on other sites

  • 1 month later...

So everything was working fine.  I made a bunch of changes to the hosted file (layouts, etc. but no schema changes).  Pulled down a fresh copy and followed your instructions for setting up the mobile database. Basically wanted a preloaded file for mobile.

 

The sync hangs at "pushing payload to server."  I let it sit for over an hour and it never changed.  I can access the server just fine, so it's not the connection.

 

Stumped on this.  I went over the mobile database setup twice and everything is as it should be.

 

Any idea what could be going on?  Is it normal for the first sync to take hours?  I don't recall it taking this long before.  We're talking hundreds of records, not thousands (granted there were roughly 100 records when syncing before, but it only took a minute at most).

 

I read you setup FAQ's about preloading data.  Not sure what you mean by going to the Payloads table and updating the UTC Time field... there aren't any records in that table (not even in the old mobile file that was syncing fine before).

 

Again, any insight is much appreciated.

 

Thanks,

 

Ethan

Link to comment
Share on other sites

Ethan --

 

It sounds like the mobile database is trying to push all of the pre-loaded records back to the server, and it will do this in cases where the ES_Last_Push_UTC_Time and ES_Last_Pull_UTC_Time aren't set.

 

Those are global fields that you'll find in the EasySync table, and you'll want to set their values to the UTC at or after you created the mobile database. The goal with this is to let the EasySync know that it was current as of a certain time. 

 

That should help. If not, let me know.

 

-- Tim

Link to comment
Share on other sites

Got it all working now.  Took about 4 minutes for the initial sync... probably because I had remnant junk in there from bailing out on the prior sync.  Added a new record on mobile and did it again, only took 30 seconds.

 

Thanks for all your help Tim.

 

Ethan

Link to comment
Share on other sites

This topic is 3514 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.