3 Replies Latest reply on Nov 11, 2013 4:15 PM by ch0c0halic

    Server Scripting - Export Records issue

    bgustin

      I have a script that I can't seem to get to run properly on our FM12 server. The script is to export records to an excel doc, and email it to a coupe of people every day. When I run the script manually on my pc (FMP12 advanced) it works fine. It save the excel file & emails it as an attachment. When I run on the server though a schedule, it doesn't save the excel file on the server (Windows Server 2003). I have the same folder (C:/test_brice/) on both my PC & server. Could there be setting on the Server preventing it from saving this file? (I don't know much about win server 2003). Below is the script & event report from the server.

       

      2013-11-11_1600.png

       

      FileMaker Server 12.0.1.178 on PENGUIN reported the following event:

       

      2013-11-11 15:52:01.140 -0600 Information 150 PENGUIN Schedule "JTP Daily Report" completed.

        • 1. Re: Server Scripting - Export Records issue
          taylorsharpe

          You cannot write to any folders that the filemaker service does not have access ti which is generally only things in the FMS's Documents folder, Temp Folder or Desktop (not your desktop, the services' desktop).  C:test.... whatever is something you created for your user and it is doubtful the FM service can write to it.  In Windows, you should be writing to something like /C:/Program Files/FileMaker/FileMaker Server/Data/Documents    Everything from Data and below is generally available to the server and nothing else on the hard drive. 

          • 2. Re: Server Scripting - Export Records issue
            bgustin

            Taylor thanks for the info, the script works now.

            • 3. Re: Server Scripting - Export Records issue
              ch0c0halic

              Your path is not available to FMS. Because it does not rely on any user being logged in FMS uses a its own account.  For security FMS cannot access ing location outside of its own folder structure. To read and write files use the Documents Path.

               

              try this.

              $filepath =

              Case (

              Get ( SystemPlatform ) = "-2" ;

              "filewin:" ;

              "filemac:"

              )

               

              & Get ( DocumentsPath )

               

              & “myfilenamer.fmp12"