Latest Zync Log

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
SeedCode Staff
SeedCode Staff
Posts: 2760
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Jan 14, 2013 6:56 am
OK. One more thing to keep in mind... if all users really do get the same data, you can deliver it in the file as well as via syncs. GoZync has a very slick system for delivering new files and for BIG data sets that can be faster than syncing the data. Congrats on going live!
John Sindelar
SeedCode
Posts: 142
Joined: Thu Nov 01, 2012 2:36 pm
PostPosted: Mon Jan 14, 2013 2:06 pm
So, just to confirm:

In my local folder on my Macbook:
I open gzMobile and hit 'Reset'
I open my locally stored Mobile app/file
Sync it with the Hosted file
Prep & Upload the file

On my iPad:
Check for new versions and download new files including the most recent data...

Does that sound about right?

Thanks
Brian.
SeedCode Staff
SeedCode Staff
Posts: 2760
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Jan 14, 2013 2:27 pm
That does. Man folks modify that Prep & Upload script to zero out some or all of the tables in the mobile file: but in your case you want everyone to get the same data, so no need.
John Sindelar
SeedCode
Posts: 142
Joined: Thu Nov 01, 2012 2:36 pm
PostPosted: Mon Jan 14, 2013 2:42 pm
Ok great, thanks John...
Posts: 142
Joined: Thu Nov 01, 2012 2:36 pm
PostPosted: Wed Jan 16, 2013 8:23 am
Just found a glitch, it's happened before but I didn't realise what the circumstances were then...

I carry out a Find on my iPad and a record (or records) are found, I then alter the same record on the hosted file from my Mac and then return to the iPad to sync the latest data down.

I start with 204 records, perform a find to return 1 record and then the sync deletes the other 203 records from the table. Should the sync script have some form of 'Show All Records' first?

Thanks
Brian.
SeedCode Staff
SeedCode Staff
Posts: 2760
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Jan 16, 2013 12:04 pm
Yes. You can learn all about this here: http://www.seedcode.com/pmwiki/pmwiki.p ... gFoundSets

But the short answer is that the script "Filter Records To Zync" in GoZyncHosted begins by performing a "Show All Records" command. We then alter that found set per table if you've modified that script. That's how you sync just *my* records, for example.

If there are records on the iPad that are NOT in the found set built by that script, they're deleted from the iPad: this would be because they'd already been deleted from the server, aren't *mine* any more, or for some other reason aren't in the found set.

Hope that helps,

John
John Sindelar
SeedCode
Posts: 142
Joined: Thu Nov 01, 2012 2:36 pm
PostPosted: Wed Jan 16, 2013 12:53 pm
It looks like the default "Show All Records" script step is there but there's something further down shown in red text, which might affect things?


User Modifiable: Filter Records To Zync
# #==============================================
# Function: if you want to filter the records that get Zynced for each layout, add a find here,
# Parameters:
# Notes:
Wrap an IF around each table occurrence like the examples below # Author: gozync
# Version: 3.0 #==============================================
#
#
#--------------------------------------------------------
#Default Behavior - do nothing else and this is what happens. GoZync will find any changed records within the found set constructed here.
#--------------------------------------------------------
Show All Records
#
#--------------------------------------------------------
#If any criteria was passed in from mobile, explode this now. v3.17
#--------------------------------------------------------
Set Variable [ $NoResult; Value:gz_ParametersToLocalVariables ]
#If you sent name value pairs up from mobile, these are available now where "name" is now a local variable "$name" with the value you passed up.
See "Downloading Found Sets" in GoZync's documentation for more info: http://www.seedcode.com/pmwiki/pmwiki.php?n=GoZync3. DownloadingFoundSets
#
#
#-------------------------------------------------------- #Build a separate found set per table occurrence #--------------------------------------------------------
If [ Get ( LayoutTableName ) = "Projects" ]
Set Error Capture [ On ]
#Pull only active projects
Perform Find [ Specified Find Requests: Find Records; Criteria: <Table Missing>: “1” ] [ Restore ]
#
// #over ride the Last Time Zync. Clearing it here means you always get these records, regardless of last Time Zync. This would be appropriate for some kind of work flows. Where the user only get a few records for the day.
// Set Variable [ $$gz_LastTimeZync; Value:"" ]
End If
#
#
#-------------------------------------------------------- #And another table occurrence #--------------------------------------------------------
If [ Get ( LayoutTableName ) = "WorkTypes" ]
Set Error Capture [ On ]
#Pull only active work types
Perform Find [ Specified Find Requests: Find Records; Criteria: <Table Missing>: “1” ] [ Restore ]
#
// #over ride the Last Time Zync. Clearing it here means you always get these records, regardless of last Time Zync. This would be appropriate for some kind of work flows. Where the user only get a few records for the day.
// Set Variable [ $$gz_LastTimeZync; Value:"" ]

End If
#
#
#you can include as many branches as you like #
#
SeedCode Staff
SeedCode Staff
Posts: 2760
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Jan 16, 2013 1:00 pm
That won't effect anything unless you have TOs named Projects or Worktypes.
John Sindelar
SeedCode
Posts: 142
Joined: Thu Nov 01, 2012 2:36 pm
PostPosted: Wed Jan 16, 2013 1:04 pm
That's what I was hoping, so something else must be preventing it from showing all records before the sync?
SeedCode Staff
SeedCode Staff
Posts: 2760
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Jan 16, 2013 1:44 pm
Maybe try running the debugger into that script and see what's happening.
John Sindelar
SeedCode
Posts: 142
Joined: Thu Nov 01, 2012 2:36 pm
PostPosted: Sat Jan 19, 2013 12:22 pm
I've only just had chance to look at this again, I tried the debugger but I couldn't keep track of everything that was happening.

Opening the mobile file on my Mac, creating a smaller found set and syncing with the hosted file deletes everything outside of the found set. The only way to get those records back again is to hit Reset in gzMobile and run the sync again.

Will reply to your email next...
SeedCode Staff
SeedCode Staff
Posts: 2760
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Sat Jan 19, 2013 1:56 pm
Great Brian; we'll work on this by email.
John Sindelar
SeedCode
Previous

Return to GoZync

Who is online

Users browsing this forum: No registered users and 2 guests

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