3 Replies Latest reply on Oct 19, 2016 3:22 PM by philmodjunk

    Export using server script

    keithstehlik

      I am trying to do an export using a server script. I already use an export script that places the export file on a mounted server with the full version of filemaker and that works fine. I am trying to add this capability to filemaker go so am trying to create a server script to do this.

      I have found that as a Server script the file can only be exported to a local drive and not to a mounted drive. I have read that the 360 ScriptMaster plugin can run a copy as a function. I am not sure how to use this copy function in a script to move my file. Can anyone help me please

        • 1. Re: Export using server script
          taylorsharpe

          There are numerous plugins that will let you copy files at an operating system level (e.g., Windows Explorer or Mac Finder).  The biggest issue often is permissions.  Remember that FileMaker Server runs as a service and the user that it runs under is often rather restricted for security purposes.  Note that because of this generally FileMaker Server generally can only manage files in the \FileMaker Server\Data\  folder.  This really is a security protection to keep FileMaker for overwriting files from other programs or operating system files, etc.  You will have more success if the mounted drive uses the same user as FMS is running on.  Also, getting file paths correct on network volumes can be a challenge as well as getting them mounted. 

          • 2. Re: Export using server script
            keithstehlik

            Taylor

            I have not even gotten as far as file permissions. I do not know how to use the script master copy function to try and use the file. How do I call the copy function within a script, they are only available in calculations? Do I create a variable and use a calculation with the function in it to set the variables value?

            • 3. Re: Export using server script
              philmodjunk

              Plug ins are typically implemented like this;

               

              Set Variable [$result ; value: ExternalFunctionCallFromPlugInHere ]

               

              The act of assigning a value to $result, which many plug ins use to report success or failure type results that you can then test for, invokes code in the plug-in.