0 Replies Latest reply on Aug 31, 2015 9:58 AM by weirded

    Sync - "Handshake" to offline remote file

    weirded

      Hi to all,

       

      I am testing / using a "sync" (let's say: upload) system, based on the wrap/unwrap method published on Filemakerhacks from Giuseppe Pupita (The XML Wrap and Unwrap technique | FileMakerHacks) -> thanks to him for the provided samples !

       

      In my tests the local file is on iPhone with FM Go 14, the remote file on Mac (OSX Yosemite with FM Pro Advanced 14).

       

      It uses the connection technic also used in the "filemaker sync guide" (handshake script passing a parameter to the remote file and getting the script result, to check if 0 or some error code).

       

      The problem is: if the remote file is not available (in my test this means: on the Mac not in the same folder or on the iPhone in case of no wifi connection) FM gives an error (not available) on entering the script, BEFORE parsing the first script line (i.e. Set error capture ON... :-)).

       

      This means, I get an "unmanaged" error message BEFORE the script can even try to trap and handle the exception through the suggested steps:

       

      - Set Variable [$token; Value: “Handshake_” & GetAsNumber(Get(CurrentTimestamp))]

      - Perform Script [“SyncHandshake” from file “HostedOnServer”; Parameter: $token]

      - Set $error = Get (LastError)


      with the question if I want to stop the script or continue...


      If I run the debug on FM Pro, entering the script the system "hangs" for 20 seconds (looking for the External Data Source), than FM sends me the error message before going to the first line.

      In the "Perform Script" step the reference to the script "SyncHandshake" in the remote file appears as missing.

       

      Can someone help me to solve this issue ?

       

      Thank you all in advance !