Records synched, then deleted from mobile. **RESOLVED**

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 22
Joined: Sun Jan 29, 2017 5:05 pm
PostPosted: Tue Nov 14, 2017 6:14 pm
I am experiencing a problem with records being deleted on the Mobile side of my solution.

I have a table for Jobs, a related table for WorkHistory, and a join table linking Parts fitted to a WorkHistory record.

The JT_Parts_WorkHistory is setup in GZH as a related table and 'requires' gzh_WorkHistory.

I create a new Job, (no related JT or WorkHistory records).

If I run 'Zync It-Everything' from the solution, it works as expected.

I then enter a WorkHistory, and use some parts, and run 'Zync It-Everything' from the solution, it works as expected.

I create a new Job, enter a WorkHistory, and use some parts.

If I sync a Job record using the Zync Now button in GZM, followed by syncing WorkHistory from GZM, it works as expected - the JT is synced along with Job and WorkHistory records.

However....

If I run 'Zync It-Everything' from the solution, all records are correctly pushed to the server, but then the JT and WorkHistory entries relating the the Job, are deleted!

I would really appreciate guidance on where I should be looking for the problem - from what I have been able to determine, it seems that $IDSWeKeep is missing the the records that end up being deleted (no surprise there!) I am unsure how $IDSWeKeep is created/determined.

Frostie.
Last edited by Frostie on Wed Nov 22, 2017 10:35 am, edited 1 time in total.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Nov 15, 2017 11:27 am
Hi Frostie,

Sorry to hear you're running into this issue with synchronization.

The first thing to do would be to check out this section of our troubleshooting documentation: https://www.seedcode.com/pmwiki/index.p ... rdsDeleted

Also, take a look at your sync logs to see if you're seeing any errors or messages that might point to what's going on.

Let me know if you're still having issues with this scenario after checking the troubleshooting docs and I'll reach out via e-mail to get a copy of your files so we can dig in a bit.

Regards,

KC
Posts: 22
Joined: Sun Jan 29, 2017 5:05 pm
PostPosted: Wed Nov 15, 2017 2:59 pm
Hi KC,

As far as I can see, the gz_id_ListOf field is correct, and the ServiceHistory table uses UUID's.

The log is showing that one record is deleted. The records in the JT are being deleted because "Delete related records in this table....." is turned on in the relationship.


0:00:00 - 0:00:16 - STARTING SERVICEHISTORY ROUND TRIP

0:00:00 - 0:00:16 - Starting Push
0:00:00 - 0:00:16 - Starting to Push "gzm_ServiceHistory"
0:00:00 - 0:00:16 - FLM is OFF
0:00:00 - 0:00:16 - Found 1 records to push
0:00:00 - 0:00:16 - Starting sync on 1 records.
0:00:02 - 0:00:18 - Sync complete!
0:00:00 - 0:00:18 - Done Pushing "gzm_ServiceHistory"

0:00:00 - 0:00:18 - Push Complete

0:00:00 - 0:00:18 - Starting Pull
0:00:00 - 0:00:18 - Starting to Pull "gzh_ServiceHistory"
0:00:00 - 0:00:18 - Last Time Zync: "63646380148078"
0:00:00 - 0:00:18 - FLM is OFF
0:00:00 - 0:00:18 - Starting Perform Script On Server to get IDS - "gzh_ServiceHistory"
0:00:00 - 0:00:18 - PSOS call complete
0:00:00 - 0:00:18 - Looking for record to Delete
0:00:00 - 0:00:18 - Deleting 1 records from "gzm_ServiceHistory"
0:00:00 - 0:00:18 - No records to delete in "gzm_JT_Parts_ServiceHistory"
0:00:00 - 0:00:18 - Deletion Complete
0:00:00 - 0:00:18 - Found 0 records that have changed since last zync
0:00:00 - 0:00:18 - Done Pulling "gzh_ServiceHistory"

0:00:00 - 0:00:18 - Pull Complete

0:00:00 - 0:00:18 - ENDING SERVICEHISTORY ROUND TRIP


Is there anything else you could suggest I check?

Many thanks,
Frostie
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Thu Nov 16, 2017 8:45 am
Hi Frostie,

We'll need to take a look at your files in order to get an idea of what's going on here. I'll reach out to you via email to work on this further.

Thanks,

KC
Posts: 22
Joined: Sun Jan 29, 2017 5:05 pm
PostPosted: Tue Nov 21, 2017 1:42 pm
After sending the solution files to SeedCode, I recieved this reply.

IDsWeKeep is created from the found set of records in the target table. If the Table has been setup with related records, then it will also find all the records that are related as well and add them to the list. So it maybe that your filters aren't working the way you expect, or the records aren't related correctly. I'd check your filters first.

also What happens when you turn Field Level Merge off on Jobs? ( Just a guess )

Todd


The problem was an issue with relationships and to a lesser extent, filters....

I had consciously decided that it was more important to robustly sync parts used for a job (Tables JT_Parts_ServiceHistory and ServiceHistory) than the ServiceHistory for a given ServiceJob, so I set up JT_Parts_WorkHistory to ‘require’ ServiceHistory.

The filter was searching on address information that was held in a table related to ServiceJob.

This is what was happening...

GoZync processes tables in alphabetic order, and pushes and pulls before moving on to the next table. Because of this, on the pull, the filter didn’t have access to the address of a newly created ServiceHistory record as it was held in ServiceJob which had yet to be processed…….

I made changes to the relationship graph in the hosted file, and that seems to have resolved the problem.

In this instance, turning off FLM for 'Jobs' didn't have an effect.

Many thanks to the awesome folks at SeedCode for their support and amazing product!

Frostie.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Tue Nov 21, 2017 1:52 pm
Hi Frostie,

Thank you much for posting your resolution to the forums! Since we can't always resolve these issues without getting a copy of your files, it's great of you to take the time to share this info with other GoZync users that might be running into a similar issue.

Thanks again!

KC

Return to GoZync

Who is online

Users browsing this forum: No registered users and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: