Records deleted on hosted file not deleted from mobile file

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 18
Joined: Tue Sep 29, 2009 9:25 am
PostPosted: Tue May 20, 2014 8:20 am
Hi,
I've got a survey app that pulls a number of tables down, and pushes some other tables up. Surveys are pulled, responses are pushed. When a user takes a survey, some fields are written to in the survey to set up certain relationships. Those changes don't sync to Hosted.

If a record is deleted from the survey in Hosted, and the Mobile file syncs before taking another survey, the record is correctly deleted from the survey. If the user takes a survey before syncing, however, the record is never deleted from the mobile file. This is not desired behavior, unfortunately.

Is there any way to modify this behavior?

Thanks,
-jb
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue May 20, 2014 9:06 am
Hi Jonathan. If a record no longer exists in the hosted file, that record will be deleted from the mobile file on the next sync. Are you sure it isn't just the "response" record you're seeing remain in the mobile file? -Jeff
Posts: 18
Joined: Tue Sep 29, 2009 9:25 am
PostPosted: Tue May 20, 2014 10:14 am
Positive. The offending record is actually in the Questions table, which is 1 of a number of tables that make up the survey. I already broke up the sync config from its parent/child configuration, because I wasn't seeing the child records deleting. Not sure if I needed to.

What I'm seeing is that in "Delete Records Not In This List ( $IDsToKeep )", the Show Omitted Only script step finds the single question record that should be deleted, but then the following Constrain omits it, leaving nothing to delete.
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue May 20, 2014 10:51 am
The behavior you describe in the "Delete Records Not In This List" script makes sense. It sounds like the record in question is being found in the hosted file, so since its ID IS in that list, it is NOT being deleted from the mobile file (the converse of the script name). So the question is, are you seeing the record that you deleted from the hosted file reappear in the hosted file after syncing? If that's the case, then my guess is it's being pushed back into the hosted file from the mobile file, and therefore not deleted from the mobile file. Are you sure you have that TO set up to "pull only"?
Posts: 18
Joined: Tue Sep 29, 2009 9:25 am
PostPosted: Tue May 20, 2014 11:15 am
Jeff,
I've verified that the record is NOT in the hosted table. I believe what is happening in the script in question is this:
1. a GTRR is used to find the $IDs ToKeep.
2. Show Omitted Only is used to show the records in the mobile file that aren't in the list and should be deleted.
3. as the comments say:
#Omit "modified" records from deletion.
#If you're just pulling, this will preserve records on the mobile device that you've created-but-not-yet-pushed.
A constrain is used to omit the records that are not in $IDs ToKeep but have been modified.

Because taking the survey modifies the survey records, I believe the omit is taking place in step 3 even though I'm not planning on pushing the records, and so the records are not purged from the mobile file.

I hate to customize the zync engine, for various reasons. I know I'm either pushing or pulling everything, so I suppose I could Disable the omit, but wondered if there's anything else I can do.

-jb
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue May 20, 2014 8:54 pm
What you're describing should not be happening. I'd like to help you get to the bottom of this but I'll have to see your files. Would you mind sending them to me at [email protected]? Be sure to include the full-access login information, and specific instructions for how I can reproduce the problem you're seeing.

Return to GoZync

Who is online

Users browsing this forum: No registered users and 2 guests

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