3 Replies Latest reply on Oct 12, 2015 10:09 AM by weirded

    Update embedded container - growing

    weirded

      Hi all,

       

      I am trying to implement an update deployment system which uses the "Insert file / Export field contents" script steps.

       

      I use as "server" a desktop (Mac) with FM Pro (not server).

       

      The idea is that when the file is updated, it runs an import and insert the new file in the container field. When the mobile file logs, the "server" should "upload" the updated file on the mobile (I took inspiration from "Colibri Solutions One click update").

       

      My problems:

       

      1) If I embed the update in the desktop file, each time I perform the import operation the desktop file grows (even if I overwrite the same field).

      2) If I store the file as reference, when I upload the new file on FM Go, the desktop uploads on the iPhone a sort of "path" instead of the actual "fmp12" file

       

      If I embed the update in an "empty" intermediate (updater) file, instead of in my main desktop file, the updater file doesn't grow when I overwrite the container field.

      However this complicates my system (I have to keep 2 files open on the Desktop - "main" ad "updater" - instead of just 1, as I am not able to open the updater from the main if the "Open file" script step is performed on the main file through the mobile file -> I get an error that the file to open can't be found...).

       

      I hope my explanation of the problem is clear enough, otherwise feel free to ask.

       

      Any thoughts / possibile solutions ?

       

      Thank you all in advance.

        • 1. Re: Update embedded container - growing
          user19752

          How does it grows?

          You can "Save copy as" for compacting the file, but without it the empty space will be used after some while.

          • 2. Re: Update embedded container - growing
            weirded

            Hi,

             

            I'm already doing following:

            1)  "save copy as (compacted)"

            2) open the copy and delete all the records from the main input table

            3) close the file and insert it into the container field

             

            What I might try is to save a new copy after record deletion, then insert the new copy.

            I don't know if it brings something and anyway I can't understand why the copy stored in the "updater" database doesn't make it grow as the copy stored in the "master" database does.

            • 3. Re: Update embedded container - growing
              weirded

              Hi,

               

              I can't save the new copy after deletion, apparently.

               

              In my procedure I open the saved, compacted file with Open URL. The opened file has a trigger "OnFirstWindowOpen", which deletes the records and then closes the file. I tried to put a "Save copy as" in this script trigger, before the "Close file", but it doesn't do nothing, so I guess that "Save copy" step doesn't work on files called by Open URL ?

               

              Anyway I'm stuck...

               

              If you have any ideas...