Push records, then delete on the device

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 11
Joined: Fri Apr 12, 2013 2:46 pm
PostPosted: Wed Jul 03, 2013 1:26 pm
We are doing some basic field data collection where once data is successfully sent up to the server we wish to have it deleted from the device. At first appearance, I thought this might be acomplished within the Zync Options dialog on GoZyncHosted with the "Delete sent mobile records before pulling from host" option set to yes. That didn't work but not sure if I'm looking in the right direction or I've got something else going on that messing it up? Thanks
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Wed Jul 03, 2013 5:55 pm
Hi Randy,

I think the best way to do this would be to create a new field to flag those records after they've been synced to GoZyncHosted (do this in the "After Committing Entity" script in GoZyncHosted), then prevent them from being sent back to the mobile user using filtering. Since those records are no longer in that user's list, they'll be deleted from the device.

Here's more info about deleting records:
http://www.seedcode.com/pmwiki/pmwiki.p ... c3.Deletes

And here's more info about filtering:
http://www.seedcode.com/pmwiki/pmwiki.p ... gFoundSets

I hope that helps. :)

Jeff
Posts: 11
Joined: Fri Apr 12, 2013 2:46 pm
PostPosted: Fri Jul 05, 2013 12:17 pm
Thanks Jeff - that worked like a charm. One final thing on this. On the device, I get a message to confirm the delete on the device. I'd like to do that delete without the dialog but not sure where that delete is being called from. Any suggestions?
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Jul 08, 2013 3:16 am
Hi Randy,

We made a mistake and neglected to turn the "[No dialog]" option on for that "Delete All Records" step in the "Delete Records Not In The IDs List (IDs)" script in GoZyncMobile, as shown in your screen shot. Just turn the "[No dialog]" option on and you'll be good to go. Sorry for the inconvenience.

Jeff
Attachments
default.png
default.png (90.87 KiB) Viewed 11780 times
Posts: 11
Joined: Fri Apr 12, 2013 2:46 pm
PostPosted: Tue Jul 09, 2013 9:33 am
I see now that in GoZync4 this is even easier - its simply a configuration option to enable the push only. Nicely done.
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue Jul 09, 2013 9:43 am
Thanks for the feedback, Randy. :)

Return to GoZync

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: