8 Replies Latest reply on May 4, 2012 11:24 AM by carlos_panda

    Multiple Runtime Files

      Title

      Multiple Runtime Files

      Post

      Apologies if the solution to this problem should be obvious but...

      I have developed a single file runtime application.

      I wish to distribute the runtime application along with with a number of separate files (eg: "Sample File", "Template File A", "Template File B", "Update File" etc). All of these files are essentially the same basic file but contain different data that has been pre-entered in FPro Advanced to provide example or starter files. I would also like the user to be able to rename their files.

      Is there a way that I can create these files so that the user can have multiple files with different names (but the same extension) on their computer and the ability to open any of them from the desktop?

      I have tried creating a separate runtime application for each file, using the same bind key and extension, then deleting all but the first runtime application (but keeping the runtime files). However, no matter which runtime file I try to open the one that actually opens is the runtime file linked to the first runtime application.

      Surely it must be possible to have more than one runtime file that opens with one runtime application?

      Thanks

       

      ps: I would rather avoid any possible solutions (if they indeed exist) that involve an invisible / off screen primary file to which all the other files are linked.

        • 1. Re: Multiple Runtime Files
          philmodjunk

          Bind all the template files during the runtime creation.

          Use a script with Open File steps to open selected "template" files. Use a script with Save a copy as to save a copy of the file with a user specified name for the file. Close the template file immediately if you don't want to allow the user to make changes in the original copy.

          • 2. Re: Multiple Runtime Files

            PhilModJunk

            Thanks for the reply. I can see that I shall have to increase the complexity of my solution in order to achieve my objective.

            Just to be clear, are you saying that if a user opens the template (primary) file and then specifies a name via Save A Copy then the newly created runtime data file should be able to be opened from the desktop without the need for the primary file?

            • 3. Re: Multiple Runtime Files
              philmodjunk

              I think that it will. I suggest testing this to be sure. This works for a single filemaker runtime. With multiple runtimes, you need to be sure to specify unique file extensions or attempting to open the file could result in a different copy of the runtime application attempting to open the file and stopping with an error message if the "bindkey" doesn't match.

              Safest approach would be to add that Primary file you don't want. There's no need to hide it, however. Opening it can present the user with a menu of choices, open a template, open file ABC that was created yesterday, etc. FilePaths can be stored in different records of the primary file to function as links to the other files.

              • 4. Re: Multiple Runtime Files

                PhilModJunk

                No luck with that approach but I shall start to play around with the startup script. Unfortunately this includes my own Registration (copy protection) process which complicates life somewhat!

                There is always a solution to these problems but in the end it may just be easier (although rather clunky) to ask the user to mess around changing file names when required... (ugh...).

                Thanks again.

                • 5. Re: Multiple Runtime Files
                  philmodjunk

                  No luck with that approach

                  Just for my own ongoing education, exactly how did that fail?

                  • 6. Re: Multiple Runtime Files

                    1. Created new runtime (AppX) & data file (Data1) (with Save A Copy As in the File menu).

                    2. Opened Data1 by opening AppX.

                    3. Selected Save A Copy As, name Data2, location same folder as Data1 & AppX.

                    4. Closed Data1.

                    5. Opened Data2 from the desktop.

                    6. AppX attempts to open Data1.

                    7. "Open Data1" window appears. If I enter Account Name & Password then select OK, Data1 opens, not Data2. If I select Cancel then "Open Data2" window appears.

                    8. If I enter Account Name & Password then select OK, Data2 opens and then closes itself, displaying the default Made with Filemaker exit window rather than the custom one set during runtime creation (which does appear on Data1 close).

                     

                    From the above I've drawn the conclusion that the original primary file (Data1) must be open for the copy (Data2) to work.

                    Clearly I need to give this some more thought...

                    • 7. Re: Multiple Runtime Files
                      philmodjunk

                      Hmmm that argues for that primary file with records that link to the user created files.... Not your first choice, but workable I think...

                      • 8. Re: Multiple Runtime Files

                        On this occasion I'm tempted (at least initially) to try to keep to a single file with a sample data purge script as suggested by RobWestergaard on the FM Technical Network.

                        Whilst this wouldn't suit everyone in my case I might be able to make it work. I'm keen to avoid increasing the complexity of what is already a pretty tricky (albeit hidden from the user) startup process.

                        Anyway, thanks for your suggestions which are much appreciated.