0 Replies Latest reply on Dec 26, 2012 10:22 AM by philmodjunk

    It's the details that get you....



      It's the details that get you....


           I recently created a fairly simple db for managing photos on a system that still uses FileMaker 10. I was trying to do it on a "zero budget" so did not want to acquire a plug in to manipulate files and folders. I set up a system that uses export records to export text to the temporary items folder and then open them to perform either batch files or VBS scripts that manipulate files, folders, shortcuts using data stored in the database to provide the command line or Visual Basic Script details needed.

           I developed it in FileMaker 11 Advanced and got it all working smoothly. Then I went to one of the client machines with FileMaker 10 installed only to get the dreaded error dialog telling me that that FileMaker was unable to create the file whenever one of my scripts attempted to create and execute one of these system script files.

           I was using these two script steps to export the text:

           Set variable [ $TempLoc ; value: Get ( TemporaryPath ) & If ( BATCHCOMMANDS::BatchType = "CMD" ; "Batch.cmd" ; "Script.vbs" ) //allows script to execute batch or VBS scripts ]
           Export Records [No dialog; "$TempLoc" ; automatically open ; Windows (ANSI) ]

           This had me scratching my follicularly challenged scalp for quite a bit since it worked perfectly on my development machine but not on a client machine. I first suspected a permissions issue with the user account on that machine, but subsequent tests triggered the same error on every client machine that I tested.

           Finally, the light dawned that maybe the fact that they were all using FileMaker 10 instead of FileMaker 11 might be an issue. I logged into my developer machine, launched fileMaker 10 and attempted to access the database (Hosted on Filemaker Server 10). I then got the same error I was seeing on the client machines.

           After researching the KnowledgeBase and coming up dry for any documented behavior changes that fit this issue, I opened the file in 10 again and examined the Specify Ouput File dialog in Export Records to see if it appeared any differently in 10 than it did in 11. There was no such change but then I realized that my expression for computing a file path to the temporary items was missing something--something that was not causing a problem in FileMaker 11, but perhaps was causing the issue with Filemaker 10 clients. I then made a very small change to my set Variable step's calculation and my solution then worked as expected for Filemaker 10 users.

           The change:

      "file: " & Get ( TemporaryPath ) & If ( BATCHCOMMANDS::BatchType = "CMD" ; "Batch.cmd" ; "Script.vbs" )