All records being deleted from some tables on sync.

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 18
Joined: Thu Oct 11, 2012 8:03 am
PostPosted: Fri Sep 06, 2013 10:21 am
On my hosted file, I flag all my records to sync (replace fields contents of gz_ModTimeStamp to 1), and running the 'Zync It - This Table' script on the mobile TO correctly pulls all data down.

9/6/2013 2:00:40 PM - Started

Split Total
---------------------------------------------------------
0:00:00 - 0:00:00 - Connecting to server...
0:00:04 - 0:00:04 - Getting settings from Host...

---------------------------------------------------------
0:00:00 - 0:00:05 - STARTING TREATMENT ROUND TRIP

0:00:00 - 0:00:05 - Starting Push
0:00:00 - 0:00:05 - Starting to Push "gzm_Treatment"
0:00:00 - 0:00:05 - FLM is OFF
0:00:00 - 0:00:05 - Found 0 records to push
0:00:00 - 0:00:05 - Done Pushing "gzm_Treatment"

0:00:00 - 0:00:05 - Push Complete

0:00:00 - 0:00:05 - Starting Pull
0:00:00 - 0:00:05 - Starting to Pull "gzh_Treatment"
0:00:00 - 0:00:05 - Last Time Zync: "9/6/2013 1:52:22 PM"
0:00:00 - 0:00:05 - FLM is OFF
0:00:00 - 0:00:05 - Starting TO Filter - "gzh_Treatment"
0:00:00 - 0:00:05 - Found 1128 Records in the filter
0:00:00 - 0:00:05 - Looking for record to Delete
0:00:00 - 0:00:05 - no records to delete in "gzm_Treatment"
0:00:00 - 0:00:05 - Deletion Complete
0:00:00 - 0:00:05 - Constraining filter records by last time zync
0:00:00 - 0:00:05 - Found 1128 records that have changed since last zync
0:00:00 - 0:00:05 - Starting sync on 1128 records.
0:00:27 - 0:00:32 - Sync complete!
0:00:00 - 0:00:32 - Done Pulling "gzh_Treatment"

0:00:00 - 0:00:32 - Pull Complete

0:00:00 - 0:00:32 - ENDING TREATMENT ROUND TRIP
---------------------------------------------------------


0:00:00 - 0:00:32 - All Done


Next time I run the 'Zync It - This Table' script on this TO--even when done immediately without doing any other changes--all records are deleted on the mobile device.

9/6/2013 2:03:23 PM - Started

Split Total
---------------------------------------------------------
0:00:00 - 0:00:00 - Connecting to server...
0:00:03 - 0:00:03 - Getting settings from Host...

---------------------------------------------------------
0:00:00 - 0:00:04 - STARTING TREATMENT ROUND TRIP

0:00:00 - 0:00:04 - Starting Push
0:00:00 - 0:00:04 - Starting to Push "gzm_Treatment"
0:00:00 - 0:00:04 - FLM is OFF
0:00:00 - 0:00:04 - Found 0 records to push
0:00:00 - 0:00:04 - Done Pushing "gzm_Treatment"

0:00:00 - 0:00:04 - Push Complete

0:00:00 - 0:00:04 - Starting Pull
0:00:00 - 0:00:04 - Starting to Pull "gzh_Treatment"
0:00:00 - 0:00:04 - Last Time Zync: "9/6/2013 2:01:12 PM"
0:00:00 - 0:00:04 - FLM is OFF
0:00:00 - 0:00:04 - Starting TO Filter - "gzh_Treatment"
0:00:00 - 0:00:04 - Found 1128 Records in the filter
0:00:00 - 0:00:04 - Looking for record to Delete
0:00:00 - 0:00:04 - Deleting 1128 records from "gzm_Treatment"
0:00:01 - 0:00:05 - Deletion Complete
0:00:00 - 0:00:05 - Constraining filter records by last time zync
0:00:00 - 0:00:05 - Found 0 records that have changed since last zync
0:00:00 - 0:00:05 - Done Pulling "gzh_Treatment"

0:00:00 - 0:00:05 - Pull Complete

0:00:00 - 0:00:05 - ENDING TREATMENT ROUND TRIP
---------------------------------------------------------


0:00:00 - 0:00:05 - All Done


This is a manually upgraded version 4.052 from 4.03. Don't really know if this problem occurred earlier as I didn't have my solution finished enough until today to really start testing the Zync logic thoroughly as it related to my project.

My GTRR script checks out OK. In my GoZyncHosted file, I didn't set up any relationships in the 'Requires' fields, as it really isn't necessary. I did have relations set up initially, but removed them all from GoZyncHosted when I started to read more about them. In my situation, the mobile device needs to contain all of the data. From the user's point of view, the mobile device is the master copy; the hosted file just acts as a backup and a method for me to push out updates, so there should never be a reason that records get deleted from the mobile device.

This is also happening to 1.5 other tables: completely deleting all records from one, and deleting all but 113 records from the other, and I don't really know why.

The only filter I have set up is on a completely unrelated table, and that appears to be working OK. There are no filters in place in the 'Filter Records To Sync' script for the TOs affected with my problem.
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Sep 09, 2013 4:35 am
Hi Aaron. This does kind of sound like a bug that was fixed in 4.052. Is your TREATMENT table set up to sync as related records in the configuration? I don't know how many tables you have set up to sync, but if it's practical, you might consider downloading a fresh, stock copy of GoZync 4.052 and doing your setup from scratch, to eliminate the possibility of any errors you might have made doing the upgrade manually. If that doesn't fix the problem, send me your files and I'll try to track it down for you. -Jeff
Posts: 18
Joined: Thu Oct 11, 2012 8:03 am
PostPosted: Mon Sep 09, 2013 10:50 am
TREATMENT used to be set up as a child table in the GoZyncHosted, but I removed all relationships there before I really started to test. As of my testing with this problem, there haven't been any relationships.

I suppose I could download a fresh 4.052, though I do have a LOT of TOs (see attached image; the anomalies in the image are where the screen capture app hiccuped during the vertical scroll). It would take me awhile to set everything up again, but maybe my manual upgrade wasn't 100%. I was looking for an easy solution first!

Maybe I'll go through all the upgrade steps again to make sure I didn't mess anything up. One thing I did notice from when I upgraded last was that in your Build 4.051 upgrade instructions, you state to replace the existing GoZyncMobile script Get Current Build Number For File ( FileName), but this script from both the 4.051 or the 4.052 downloaded files list in the comments "Version: 4.02 FBz 21794", and at a quick glance it didn't look like this script was updated at all.
Attachments
GoZyncMobile TOs.png
GoZyncMobile TOs.png (167.68 KiB) Viewed 11537 times
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Sep 09, 2013 11:12 am
Hi Aaron. I see what you mean. It would take some time to redo your integration from scratch with all of those TOs. Let me know if you can't figure it out. You're welcome to send me your files; I'd be happy to help you track down the problem. -Jeff
Posts: 18
Joined: Thu Oct 11, 2012 8:03 am
PostPosted: Mon Sep 09, 2013 5:05 pm
Today was a bit of a mess, but I plan to focus on this problem entirely tomorrow (9/10). In the meantime, I am e-mailing a link to my files to your support address, in case you hopefully spot something easy. Thanks.
Posts: 18
Joined: Thu Oct 11, 2012 8:03 am
PostPosted: Tue Sep 10, 2013 5:48 am
I just ran through all of the upgrade steps from 4.04 through 4.052, and didn't notice any errors. I would prefer to hear from you first before I re-do everything scratch though.
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue Sep 10, 2013 11:56 am
Hi Aaron. I found the problem and it's easy to fix. It's also an easy mistake to make, though not so easy to find. The "Go to Related Records" steps in the "Setup Go To Related Records (TOName)" script in GoZyncMobile all use the "Layout name by calculation..." option. The GTRR in your Else If [$TOName = "gzm_Treatment"] section is using the "Layout NUMBER by calculation..." option (see attached screen shot). Just switch that back to "Layout NAME...", save the script and the sync should work. I didn't check all of the GTRR's in that script, but you might want to do that if you see any other similar problems with synching. -Jeff
Attachments
2013-09-10_1349.png
2013-09-10_1349.png (183.49 KiB) Viewed 11509 times
Posts: 18
Joined: Thu Oct 11, 2012 8:03 am
PostPosted: Tue Sep 10, 2013 12:03 pm
That is awesome. I was hoping for an easy fix!

I am one of those people that actually tries to thoroughly read directions, and I completely missed that nuance.

I might not have time to test this anymore today, but will hopefully get it tested by tomorrow morning at the latest, and will post my results.
Posts: 18
Joined: Thu Oct 11, 2012 8:03 am
PostPosted: Wed Sep 11, 2013 5:38 am
So far so good. Records appear to be syncing logically now. There were a total of two GTRR steps that needed to be changed from 'number' to 'name'. Those must have been mis-clicks, since name does make more sense.

If possible, this would be a good thing to check for in the --> Then Run This...Test "Setup Go To Related Records (TOName)" Script.
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Wed Sep 11, 2013 7:28 am
Yes, great idea! I'm glad everything is working now for you. Thanks for the feedback. :)

Return to GoZync

Who is online

Users browsing this forum: No registered users and 3 guests

cron
(855) SEEDCODE
support@seedcode.com
Follow us: