GoZync 5.0.2 - Syncing

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 23
Joined: Thu Jun 26, 2014 2:41 am
PostPosted: Wed Jul 09, 2014 3:50 am
Good Afternoon,

I have come across what i think may be a bug.

In the sample file of QuickContact, upon syncing, only records that have changed where pulled. Where as in 5.02 WorxMobile all records are pulled regardless.

Can you confirm if this is correct or if I am mistaken?

Kind Regards,
Rick
Posts: 23
Joined: Thu Jun 26, 2014 2:41 am
PostPosted: Wed Jul 09, 2014 4:52 am
Hi,

Just to add further into this, We believe the change is within the PSOS Mods, there is a script called "Get IDs to Pull From Host, Delete Records On Mobile That Have Been Filtered Out PSOS"

In here there is no #Check for last time zync, where there is in 4.058

Thanks,
Rick
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Wed Jul 09, 2014 6:24 am
Hi Rick. The two files are using different filter behavior when syncing. Each filter gets to decide whether LastTimeZync is ignored or not. In QuickContact the filter does NOT ignore LastTimeZync. In WorxMobile, the filter ignores LastTimeZync. HTH... Jeff
Attachments
default-7.png
Filtering in WorxMobile (GZ5)
default-7.png (31.37 KiB) Viewed 7986 times
default-8.png
Filtering in QuickContact (GZ4)
default-8.png (29.85 KiB) Viewed 7986 times
Posts: 23
Joined: Thu Jun 26, 2014 2:41 am
PostPosted: Wed Jul 09, 2014 7:02 am
Hi Jeff,

I understand that in the Filters, but I am not ignoring the Last Zync Time. Going through the GoZync scripts, I can not see anywhere that checks for the Last Zync Time to find what needs to be pulled, Instead this just pulls all rows.

Attached is the filter that is being performed


Thanks,
Rick
Attachments
Filter.PNG
Filter.PNG (6.04 KiB) Viewed 7983 times
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Wed Jul 09, 2014 7:44 am
Hi Rick. I think I didn't completely address your original question. You're right that our sample "Worx" solution is set up to always pull all of the mobile user's records. This is because we've included a simple implementation of the "Checking Out Records" option, which sets the "checked_out" flag field in the mobile file to "1" during the sync. That causes the gz_ModTimeStamp field to update, which means those records will be found again and re-pulled on the next sync. You can wrap that step in an If[] clause and add your own logic to determine how and when that field is updated. For example, you might want to mark that flag field only if it isn't already marked, or only if the record has changed on the mobile side.

Read more about how to use the "Checking Out Records" feature here:
http://www.seedcode.com/pmwiki/index.ph ... OutRecords

Jeff
Posts: 23
Joined: Thu Jun 26, 2014 2:41 am
PostPosted: Thu Jul 10, 2014 12:18 am
Hi Jeff,

That's great, we can use the Custom Mapping to see when a record has been pulled onto a device, However. I can not see where we can use this to stop a record from pulling again if it already exists on the device?

Can you advise?

Thanks,
Rick
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Thu Jul 10, 2014 3:35 pm
If you disable the "Ignore Last Zync Time For This Filter" sub script in the "Filter Records To Pull" script in your hosted file, AND add your own logic into the "THE PULL ACTION" and the "THE PUSH ACTION" sections in the "Custom Field Mapping: Transformation and Hooks" script, you can control which records get marked and which ones get pulled. Start by disabling ALL of those things, and only changed records should get synced. HTH... Jeff
Posts: 23
Joined: Thu Jun 26, 2014 2:41 am
PostPosted: Fri Jul 11, 2014 12:55 am
Hi Jeff,

To confirm, we have removed the script "Ignore Last Zync Time For This Filter". In regards to our own logic into the PULL action and PUSH action, is this not to set fields or can you constrain filters?

On another note, the attachment is a snipping from the script Get IDS Needed for Sync PSOS. In the section "#find the records changed since last sync" but there doesn't seem to be anything in the Constrain Found Set, is this correct?

Thanks,
Rick
Attachments
Get IDS Needed for Sync PSOS.PNG
Get IDS Needed for Sync PSOS.PNG (9.31 KiB) Viewed 7856 times
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Fri Jul 11, 2014 10:49 am
The "Custom Field Mapping: Transformation and Hooks" script is for setting fields, not filtering. I think that Constrain Found Set step is broken in your file. I'm attaching a screen shot of how it's set up in the stock WorxHosted file. HTH... Jeff
Attachments
Screen Shot 2014-07-11 at 12.47.26 PM.png
Screen Shot 2014-07-11 at 12.47.26 PM.png (287.79 KiB) Viewed 7815 times
Posts: 23
Joined: Thu Jun 26, 2014 2:41 am
PostPosted: Tue Jul 15, 2014 1:51 am
Hi Jeff,

Thank you for all the assistance.

We now have our database working correctly

Thanks,
Rick
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue Jul 15, 2014 4:01 am
Terrific! Thanks for letting us know.

Return to GoZync

Who is online

Users browsing this forum: No registered users and 1 guest

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