11 Replies Latest reply on Oct 20, 2014 6:18 PM by mikebeargie

    FMGo Zipped Solution Distribution Challenge


      I have a FMPro-Go solution consisting of 11 databases totalling about 100MB uncompressed. The folder compresses to about 18MB


      I'm trying to figure out a way to distribute the compressed solution directly to FMGo users via a cloud storage service such as Box.net. I don't want to stage the solution distribution via their desktops for decompression and transferring to their iPads if possible.


      Upon downloading the zipped solution from Box directly to an iPad, it needs to be unzipped. I've tested 2 iPad unzipping apps. While they both accomplish the unzipping nicely, I haven't been able to get the unzipped databases into the FMGo folder without opening each one at a time.


      Does anyone have any ideas for an efficient process for accomplishing my goal?



        • 1. Re: FMGo Zipped Solution Distribution Challenge

          How about a filemaker distro file that just exports the files to the users filemaker folder? You could use Insert From URL or a remotely hosted file to store the files you need (unzipped).


          FMEasySync is free and also has a file updater component that might work for your needs if you need a more robust way to handle file updates as well.


          Both of those are uncompressed options though. I can't think of a way to interact with multiple files at once as you describe.

          • 2. Re: FMGo Zipped Solution Distribution Challenge
            Paul Jansen

            I think Mike's suggestion of a distribution file is a great one. 


            11 records in the distro file each with a container containing one of your 11 files.  simple looping script that runs on first window open to export each of the files and you're done.  You can then zip the disto file which will be the only file you need to open after unziping. 



            • 3. Re: FMGo Zipped Solution Distribution Challenge

              This sounds promising.


              I created the distro database with 2 fields - Record # and Filename (container)

              I created the 11 records

              I imported each of the 11 databases into one of the 11 records

              I created the looping script to export each record's contents into a new folder.


              But I may be missing a finer point about exporting. In the export script, how do I get the correct file name of each of the exported files into the destination folder without having to enter their names one at a time?


              Thanks for your help.

              • 4. Re: FMGo Zipped Solution Distribution Challenge

                If you reference the container field in a text result calculation, it will return the file name.

                • 5. Re: FMGo Zipped Solution Distribution Challenge
                  Paul Jansen

                  And you can set the export location as a variable


                  $exportpath = "file:filename"  where filename is obtained using Ibrahim's suggestion


                  And use this in the 'export field contents' script step.



                  • 6. Re: FMGo Zipped Solution Distribution Challenge


                    I created a new calc field FM12FileNameTextCalc, which gets the name for the file in container field FMFileName.


                    I set up the variable named $exportpath with a value = "BPHTEST\Export\FM12FilenameTextCalc", which is the destination folder where I want the exported files to be sent.


                    Assuming the above is correct, then what is the syntax for the Export Output file path?


                    And the Field Export Order is FM12Filename?


                    Thanks for the spoon feeding.


                    • 7. Re: FMGo Zipped Solution Distribution Challenge

                      There is no need for the textcalc.  All you need to do is set $exportpath to the container field.  You can not put files in folders.  The files will go to the FileMaker Go Documents location.  There is no field Export Order when using Export Field Contents because you are exporting a file not data.

                      • 8. Re: FMGo Zipped Solution Distribution Challenge

                        Run this script to do what you want


                        Go to Record[First]


                        Set Variable [$exportpath;Value: container field ]

                        Export Field Contents[ container field; "$exportpath"]

                          Go to Record[Next; Exit after last]

                        End Loop



                        You could also do this with a repeat field instead of creating 11 records.  Create a repeating container field with 11 repetitions.  insert each file into a container field.  Then run this script to add all of the files to the FileMaker Go Documents location:



                        Set Variable [$count; Value:$count + 1]

                        Set Variable [$exportpath; Value:GetRepetition( container field; $count)]

                        Export Field Contents [ container field; "$exportpath"]

                        Exit Loop If [$count >10]

                        End Loop

                        • 9. Re: FMGo Zipped Solution Distribution Challenge

                          Worked perfectly. Thanks for your help.

                          • 10. Re: FMGo Zipped Solution Distribution Challenge

                            One further dilemma. While the script you gave me works perfectly on the desktop, it does not work on my remote host's FM13 server. When the script attempts to create the separate databases from the Distro file, I get an error message for each attempt to create the 9 databases.


                            The error messages are that the files the scripts want to create "cannot be created on this disk. The dbs are either locked, or the disk is out of space". Neither is true.


                            Is a modification of the script necessary for usage in the FM13 server environment?



                            • 11. Re: FMGo Zipped Solution Distribution Challenge

                              Filemaker Server requires the valid get(documentspath) as part of the export path. You are limited to only the documents or temp folder on the server.


                              Auto-saving new files to the filemaker databases folder is dangerous and should be avoided.