6 Replies Latest reply on Feb 15, 2011 8:05 AM by mgores

    Applescripting finder in Filemaker



      Applescripting finder in Filemaker


      I am using Filemaker 11 on a Mac network and have a DB to keep track of jobs that come through.  As a new job is entered we create a new record and type in all of the information.  I have set up a portal to show related quote information from my Quote DB so that I can copy/paste or click and drag information.  Where I can info is automatically filled in from the quote via lookups.  Everything is working fine there.

      What I am trying to figure out how to do is set up filemaker to take the value from my Job# field, bring up a Finder window to my "Jobs" folder on the server, then create a new folder using the Job# as the folder's name.

      I am not very well versed in applescript, but it seems like this would be a doable task.  It would be convienient to have the job folder created at the same time we log the job in.

        • 2. Re: Applescripting finder in Filemaker


            Of course there are ways to accomplish this as David has indicated, but why would you want to? What exactly do you propose to store in your folder? You may up storing, according to your post, a copy of your DB, something you almost certainly would wish to avoid. On the other hand, I may be missing the point of your question.


          • 3. Re: Applescripting finder in Filemaker

            Thanks for the links David.  I'll check those out.

            Rick, We are a service laboratory.  The jobs we work on come in from a customer and get logged in with a Job#, we create a folder on the server for that job and all of the photographs and other data for that job go into that job folder.  Once we have completed the analysis we write a report using those pictures and data. What I was hoping to do is have my job tracking DB create that folder (job#-customername) automatically when we enter the job. 

            There are also some departments that use a Filemaker file to write reports.  There is a blank version of this file on the server that, when opened runs a script that saves a copy of itself (getting the user input for file name and location), then opens the newly created copy and sets the Job# field to the appropriate job number.  The remaining fields are then filled in via lookups from the Job tracking DB.

            I figured if I can get finder to create a job folder, it would be simple to script in the creation of the blank report to be saved in the same folder as well.  So that the people writing the reports would just have to write the appropriate text and insert the photographs as they go along.

            • 4. Re: Applescripting finder in Filemaker

              After some trial and error, I have managed to get it working for the most part.  The only issue now is that there are a couple of users on the network that use PCs.  I was hoping that since the databases were hosted on a Mac server that the scripts using apple script would work, but apparently that isn't the case.  They do work if you call them from a Mac client, but from windows.  I'm guessing I'll have to write a 'platform check' into the script and figure out how to do it in windows as well.

              • 5. Re: Applescripting finder in Filemaker

                Since this needs to be cross platform, you might check for a File/folder plug in for FileMaker. There are several offered and one or the other might enable you to make this a cross platform solution.

                • 6. Re: Applescripting finder in Filemaker

                  David, again thanks for those links.  Have solved pretty much all my issues and am able to get Filemaker to do things I wasn't even hoping for.  i.e now when I finish a job and change its status to "shipped" filemaker goes into my active job folder -inserts the report into a container field, creates a folder on my archive disk and moves that job's folder to the archive as well as putting a copy of the report into our customer FTP site into that customer's folder. 

                  Some customers prefer to have the report emailed and I am sure with another couple of script steps I will have that feature added, just need to add a "wantsemail" field to check that preference.

                  Am having trouble PCs with the Mooplug and figuring out how to use it.  From the feature list I should be able do everything I need.  The documentation isn't real clear and not sure I am using it right as it keeps making filemaker crash.