Jump to content

Sync Duplicates Changed Records in Hosted and Mobile


mrauckis
 Share

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

Recommended Posts

I just started working with Easy Sync this weekend.

 

I'm using it for tracking locations of tools with iPods and IPhones. The idea is that changes to tool locations are entered and then when have access to servers sync back. It is a database with about 826 records.

 

Following is the test I ran:

 

      1. In Mobile file - made a change to a field on a single record

      2. In Hosted file - using a different computer made a change to field on a different record from the one in the mobile file.

 

After the sync:

 

      1. In Mobile file - have a new record that is a duplicate ES_Record_UUID of the record changed in the hosted file.

      2. In Hosted file - have a new record that is a duplicate ES_Record_UUID of the record changed in the mobile file.

 

So instead of modifying the records during the sync it just added duplicates of the changed records. The added records have the new correct information in them, but didn't merge/change record with the same ES_Record_UUID, instead have an obsolete record and correct new record. 

 

Any help would be appreciated.  Thank you!

Link to comment
Share on other sites

Two things to check for:

 

• Are you sure that the duplicates have the same value for the ES_Record_UUID?

 

• Have you checked the relationship between the EasySync_Payload_Details table occurrence and the "ES_" table occurrence that the duplicates are appearing in? You want to make sure that the relationship is being based on EasySync_Payload_Details::ES_Child_Record_UUID = [Your_Table]::ES_Record_UUID.

 

-- Tim

Link to comment
Share on other sites

Tim,

 

Thanks for the reply.

 

I used Filemaker ! operator to check for duplicates and yes they are the same ES_Record_UUID.

 

Upon review I corrected the EasySync_Payload_Details table from EasySync_Payloads_Details on both mobile and hosted. 

 

Also, I re-uploaded the scripts and checked them for errors, the scripts referring to the host file needed to be fixed.

 

Tried agian, I reset the date to yesterday and the only sync record was a new record transferred from host to mobile (that worked fine), none of the changed records in host file were changed in mobile (should have been 21 changes).

 

One record from mobile was duplicated in host file again. 

 

Not sure what to try from here.  Thanks for any help!

Link to comment
Share on other sites

Tim,

 

There were 38 records on the the hosted file that should have been updated on the mobile. Looked like Sync Status Display looped through the 38 records. It modified 2 records on the mobile. 

 

Added one record to the hosted, that created a duplicate. 

 

Thanks!

Link to comment
Share on other sites

From what you've described, it sounds like either the global timestamps on the mobile side aren't set properly, or the ES_UTC_Time values in the records on the host are either not set or set improperly. EasySync relies on these fields to determine what records to push to the host, and what records to send down to the mobile device...

 

On the mobile side, you can run the "Sync Utilities" script, which will clear the timestamps for you. On the hosted side, make sure that the ES_UTC_Time values have been set properly.

 

Other than that, I can't think of anything else that would cause this issue. If, after making those changes, you still have problems, then I recommend going back through your configuration again and comparing it to the demo solution.

 

-- Tim

Link to comment
Share on other sites

Tim,

 

I decided to start from scratch.  I deleted all records in the mobile, used Sync Utilities to reset and wipe.

 

Then I ran script Sync with Server and it looped through all 832 records and downloaded 1 record (the last record that was modified in Hosted database) of the 832 records I expected.

 

Let me know if you have any ideas on solution.  Thanks!

Link to comment
Share on other sites

On the hosted side, I would look at the one record that did download, and try to determine what makes it different from those that did not.

 

Specifically, I'd look at:

 

• The ES_UTC_Time values.

• The ES_Device_ID values. (Make sure that you didn't update the hosted records using the same device that you are then trying to do the sync from.)

• The ES_Exclude values.

 

Also, when you say that it "looped through all 832 records," what do you mean, exactly? You should really only be seeing that kind of progress when pushing updated records from the mobile database to the host.

 

-- Tim

Link to comment
Share on other sites

Tim,

 

Why is it necessary to use the ES_Device_ID values in the sync from your point of view?

 

Is there a way to turn off checking the ES_Device_ID values and just make sync decision based on the ES_UTC_Time values and ES_Exclude values.  I believe that would be helpful for maintaining data on my application.  Otherwise I have to keep going to other computers to correct data because it won't sync to my programming copy of the database. 

 

Thanks!

 

Marius

Link to comment
Share on other sites

Marius --

 

The "ES_Device_ID" is necessary for situations where a user might be syncing from multiple devices using the same FileMaker account. For example, you might have a user syncing from both an iPad and an iPhone. In those cases, the ES_Device_ID is used to determine what records need to be pushed and pulled to and from each device.

 

If that scenario isn't applicable to you, then you can modify EasySync so that the ES_Device_ID values are not considered when creating payloads.

 

-- Tim

Link to comment
Share on other sites

This topic is 2504 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
 Share

×
×
  • Create New...

Important Information

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