Page 1 of 1

Push records, then delete on the device

PostPosted: Wed Jul 03, 2013 1:26 pm
by RandyWebb
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

Re: Push records, then delete on the device

PostPosted: Wed Jul 03, 2013 5:55 pm
by jeffalmquist
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

Re: Push records, then delete on the device

PostPosted: Fri Jul 05, 2013 12:17 pm
by RandyWebb
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?

Re: Push records, then delete on the device

PostPosted: Mon Jul 08, 2013 3:16 am
by jeffalmquist
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

Re: Push records, then delete on the device

PostPosted: Tue Jul 09, 2013 9:33 am
by RandyWebb
I see now that in GoZync4 this is even easier - its simply a configuration option to enable the push only. Nicely done.

Re: Push records, then delete on the device

PostPosted: Tue Jul 09, 2013 9:43 am
by jeffalmquist
Thanks for the feedback, Randy. :)