Change gz_ModTimeStamp in host file to auto-enter calc

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 8
Joined: Sun Jun 16, 2013 8:33 am
PostPosted: Wed Jul 17, 2013 10:37 am
I have a situation where I'd like the GoZync mod timestamp to update only for certain fields. Not all fields in the host file exist in the mobile file, and I would like to avoid needless updates to records unless one of the fields that actually need to get updated changes.

To that end, I have developed an auto-enter calc that renders the desired conditional updating. Let's say on Table 1, there are fields a, b, c, d, and e. I only want to update the timestamp if b, c, or d change. I have put together the following auto-enter calc which I would potentially use on the gz_ModTimeStamp field:

Let ( ~trigger = b or c or d ; If ( ~trigger ; Get ( CurrentHostTimestamp ) ; Self ) )

This yields the desired updating only on the relevant fields. I just want to make sure changing this field in this way won't result in other problems with the GoZync software. Your advice would be appreciated!
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Wed Jul 17, 2013 12:44 pm
Hi Dale. It shouldn't matter how you trigger the gz_ModTimeStamp field to update. GoZync just looks at the value in that field to determine whether the corresponding record on the server has been edited more recently. That said, I'm not sure your calculation will actually work as an auto-enter calc. You might need to go with a script trigger on the applicable field objects. HTH. -Jeff
Posts: 8
Joined: Sun Jun 16, 2013 8:33 am
PostPosted: Wed Jul 17, 2013 1:56 pm
Thanks Jeff. Setting up script triggers would be extremely onerous, there are many fields, many layouts, and many ways a given field might get updated via a scripted process, etc. My testing thus far has shown my calculation works as desired; the trigger code trips an update of the timestamp if any change occurs to one of the listed fields but not if a change happens to an unlisted field. Perhaps I should perform some more testing to be sure, perhaps doing a replace or script update to be sure it is robust enough to respond to various ways a field might update. But I did ask about this proposed calc over at fmforums and the consensus there seemed to be the calc should work fine for this purpose of a conditional mod timestamp that responds only to specific fields.

Return to GoZync

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: