4 Replies Latest reply on Jul 8, 2013 9:56 AM by ecologist

    File Path Problem: Snow Leopard vs. Mt. Lion?


      I  am using Mac OS Snow Leopard OS 10.6.8 and my partner is using Mountain Lion OS 10.8.4. I've attached a document (or other file) indexing FM solution where the user:


      1) selects a file

      2) an applescript then opens the file

      3) the user can then rename the file, creating a new record in an FM database

      4) an applescript then renames the file

      5) the file path is extracted and placed into an FM text field either (depending on the file path syntax) via

                a. an applescript that copies it to the clipboard with FM then pasting it into the field, or

                b. a Get (DesktopPath) script

      6) scripts then parse the text field and edit the file path to the correct syntax for FM and Mac

      7) a calculation field that displays as a container is defined as = the text field


      Viola! The file can now be opened from within its database record by clicking on the calculation field that displays as a container.


      This works flawlessly on my Mac running Snow Leopard. It does not work on my partner's Mac running Mountain Lion. The exact same path(s) to file(s) in the same relative position on the computer does not allow FM to find that file so it can be opened from the calculation-container field. Is this a syntax problem in the file path in Mt. Lion? I've tried hand editing the file path in various ways but not found anything that works. Any ideas on what is wrong and how it can be corrected?


      I'vr tested this it under various scenarios on both the Mac running Snow Leopard and the computer running Lion. It works perfectly on the Snow Leopard computer, but not on the computer running Lion. The different scenarios were:

      1) file on desktop

      2) file in folder on desktop

      3) file in folder in Volume

      4) file in Users (i.e., the house icon Mac's show in the finder)


      Same result for all. Fully functional under SN, but completely dysfunctional under Mt. Lion.


      Just to be clear, this is with the FM solution installed separately on both computers and testing with files located on that particilar computer.


      Is the problem something about Mt. Lion or is there something peculiar about my partner's computer? Thanks in advance for any insights or help anyone can provide.

        • 1. Re: File Path Problem: Snow Leopard vs. Mt. Lion?

          Where and when is the Get(DesktopPath) script run?  Is it possible that this was set on your own computer, and not reset on the Mountain Lion computer before attempting to access the required file?  Is the filepath stored or are ALL components of the filepath determined at the time of running the script to open the required file?


          And just to clarify... was the file you were trying to open on the local computer in all cases, or was it on the computer running Snow Leopard in all cases?

          • 2. Re: File Path Problem: Snow Leopard vs. Mt. Lion?

            As I stated in my initial post:

            5) the file path is extracted and placed into an FM text field either (depending on the file path syntax) via

                      a. an applescript that copies it to the clipboard with FM then pasting it into the field, or

                      b. a Get (DesktopPath) script


            If you have FM Advanced you can step through the various scripts while watching the "Documents" layout to see what is happening.


            To clarify:

            The files and the FM solution are on the local computer.

            The concept is for a user on a local computer to use this for indexing documents while simultaneously linking to them from within the FM database. That is, the links to the files are not "pre-installed," but added by the user.


            If you install the zipped example database of this that I attached you can see this. It is a stripped down version of the larger solution and illustrates this behavior (works perfectly on SN but not on Mt. Lion).

            Make a copy of the test file to be imported into the database so you don't accidentally delete or otherwise screw it up.

            In the Index" layout click on the "Import File" button, then follow the instructions:

            1. select (don't open, just select) the file to import and/or rename;

            2. click "Finish Import."


            On SN, the file will now be openable by clicking in the "Index" layout on the blue field. It should show an icon for the referenced file. Again, everything works perfectly in SN and not in Mt. Lion. You can see the filepaths that are created by looking in the "Documents" layout. The scripts are pretty basic, nothing fancy and, again, seem to work fine in SN but not Mt. Lion. I'd really like to hear from people running Snow Leopard and Mt. Lion if the solution works on their systems.

            • 3. Re: File Path Problem: Snow Leopard vs. Mt. Lion?

              Hello, I am running 10.8.4 FM 12 v4, it works for me. File inserts, double clicking on the file inside the container launched the file.


              Question: why Applescript? I have found it to be a little in-consistent between OS's and using the clipboard is risky. Also, it happened to me once where I had the file selected, then clicking on the FileMaker window de-selected by file in the finder - perhaps I clicked once on the FileMaker window and then once on the button??


              You could achieve a better result by using a plugin, for example, BaseElements plugin, which is "free" (they ask for 'sponsors' if I remember correctly), this plugin allows you to select a file directly via FileMaker (using a select file dialogue) and then you can insert it into a container....and then there is a LOT more you can do with this plugin.


              These guys have also published important notes about the different behaviours between Mac systems, for example, if a user has "fileguard" running on their mac, this changes everything!


              check it out at:


              1 of 1 people found this helpful
              • 4. Re: File Path Problem: Snow Leopard vs. Mt. Lion?

                Thanks. It sounds like there might be something about the way the  Mountain Lion OS is set up on my partner's computer, though I'd like to hear from other people who try my solution on Snow Leopard and Lion..


                I used AppleScript because 1) I wanted the users to initially be able to open the file from within FM; 2) rename it and have that "automatically" also create a record and and enter the basic indexing data; and 3) end up with being able to open the file from within FM. Initially I hoped that the new FM 12 container fields would make it possbile for the user to simply drag and drop the file into a container and then recover the file path with a script, but it seems that this is not possible. Instead, the user would have to use the "Insert FIle" step and that makes the process more tedious for the user, especially if the file(s) to be imported are in sub-folders. As I've got ths set up now, the user only has 4 actual steps: 1) click the "import file" button to bring up the instructional dialogue; 2) select the file; 3) rename the file (if desired); 4) click the "finish import" button to complete the process.


                I will check out BaseElements. If its possible to include it with a Runtime solution than it may work.


                But I'd still like to hear from others as to whether my sample solution works on other computers runnig Snow Leopard or Lion.