Page 1 of 1

GoZync 5.0.2 - Syncing

PostPosted: Wed Jul 09, 2014 3:50 am
by sgwdev
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Wed Jul 09, 2014 4:52 am
by sgwdev
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Wed Jul 09, 2014 6:24 am
by jeffalmquist
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Wed Jul 09, 2014 7:02 am
by sgwdev
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Wed Jul 09, 2014 7:44 am
by jeffalmquist
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Thu Jul 10, 2014 12:18 am
by sgwdev
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Thu Jul 10, 2014 3:35 pm
by jeffalmquist
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Fri Jul 11, 2014 12:55 am
by sgwdev
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Fri Jul 11, 2014 10:49 am
by jeffalmquist
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

Re: GoZync 5.0.2 - Syncing

PostPosted: Tue Jul 15, 2014 1:51 am
by sgwdev
Hi Jeff,

Thank you for all the assistance.

We now have our database working correctly

Thanks,
Rick

Re: GoZync 5.0.2 - Syncing

PostPosted: Tue Jul 15, 2014 4:01 am
by jeffalmquist
Terrific! Thanks for letting us know.