1 Reply Latest reply on May 16, 2012 9:54 AM by TSGal

    Help with script based sync

    harringg

      Title

      Help with script based sync

      Post

      I am considering an upgrade from Bento 4 to FMP 12, simply for the fact my databases are becoming more complex than Bento can handle.  But I need my data on my iOS device to sync to/from my desktop (without connecting to iTunes first)

      Please provide some links to successfully setting up script based syncing with FMP 12 and FMP Go.  It seems an elusive topic as I've spent a fair amount of time searching online for solutions.  I'm not ready to pay more money for a third-party sync solution, as I'm the only user of my data.

      DB1.fmp12 on desktop

      DB1.fmp12 on iPhone

      Make change on iPhone while away from wi-fi newtwork which has desktop DB1.fmp12.  Upon return, sync (is merge proper term?) added items from iPhone to Desktop via wi-fi.

      And/Or

      DB1.fmp12 on desktop

      DB1.fmp12 on iPhone

      Make multiple changes on desktop.  Sync (merge) changes to iPhone via wi-fi.

      It seems odd that a less powerful app can sync easily via wi-fi, but a more powerful one can't.

      In my case, there wouldn't be simultaneous changes made on both devices, changes would be made on one or the other.  So no risk of data getting deleted between syncs.

        • 1. Re: Help with script based sync
          TSGal

          Grant Harrington:

          Thank you for your post.

          There are several factors for trying to set up a sync in FileMaker Pro.  Fields that would become useful are Date fields set up for options with Modification Date.  That is, anytime a record is modified, that Date (and Time if Timestamp field) is automatically entered into the field.  This way, you can compare this information with the last time you synced, and if greater, than update the other file.

          In your script, you would connect to the host database file and then perform the compares sinces the last sync.  Once finished, you would update a field with the date and time of the sync completion.

          Once a record needs to be updated, you would find the same record in the other file and make the updates.  If the other record cannot be found, then you know it is a new record and needs to be updated.  You'll also need to make a deletion file in case records are deleted, and you want them deleted in the other table.  Otherwise, a record that was deleted would be added back again on the sync.

          I would advise not doing this all at once.  Perform each part one at a time until it works the way you want.  Then, add the next part.

          Let me know if you need additional clarification.

          TSGal
          FileMaker, Inc.