3 Replies Latest reply on May 12, 2016 12:58 AM by user19752

    FileMaker server script scheduler error?

    kamal1234

      Dear Community Members,

      I am running a simple three line script to dump the table data in a csv file.

       

      It runs successfully when I run it from script window but I see following errors when I run the script from filemaker server scheduler.

      In the Log viewer of the server I see the following errors

      Schedule "CPD10P Backup" scripting error (3) at "XXX : Misc - Open : Set Use System Formats".

      10-May-2016 3:45:04 PM

      Server Events

      Information

      645

      Schedule "CPD10P Backup" scripting error (3) at "XXX : Misc - Open : Adjust Window".

      10-May-2016 3:45:04 PM

      Server Events

      Information

      645

      Schedule "CPD10P Backup" scripting error (3) at "XXX : Misc - Open Freeze Window

      Schedule "CPD10P Backup" scripting error (3) at "XXX : Misc - Open : Set Use System Formats".

       

      Please can someone point out what wrong I am doing here.

       

      Kamal

        • 1. Re: FileMaker server script scheduler error?
          wimdecorte

          Error 3 means there is a script step that is not server compatible:

           

          14 Script Step Compatibility training document

           

          You have to either remove those steps or branch around it if you also want to run that same script from both client and server.

           

          Use the Get(ApplicationVersion) function to find out if the script us run from the server or the client.

          • 2. Re: FileMaker server script scheduler error?
            ashwinmevin

            FileMaker products support the ability to run a script locally or on the server where the file is being hosted.  A Perform Script on Server script steps allows you to run a script on the server.  Sometimes it is beneficial to run a script on the server.  This is especially helpful for FileMaker Go solutions that have to use a plugin to process credit card or other offsite information. Since server side script execution can use plugins they can use "Perform Script on Server" to send data over to the server via a script parameter, execute a script there that uses the plugin (which may install it if necessary), and get the result back via the Get(ScriptResult) function.

            The format for the Perform Script On Server script step is as follows:

            Perform Script On Server [Wait for completion; "<script name>"; Parameter: <parameter>]

            To select a script to run on the server, click Specify and choose the script from the list.  You can include an option script parameter by typing the text you want to use or click Edit and use the Specify Calculation dialog box to build a more complex parameter.  The "Wait for completion" option pauses the script on the client until the sub-script called by "Perform Script On Server" is completed on the host.  The "Wait for completion" option must be selected to pass a script a script result or error code from the host to the client.  Use the Get (ScriptResult) function to capture a result or the Get (LastError) function to capture an error code

            To utilize the "Perform Script on Server" script step, the following information is important to know:

            The current file must be hosted using FileMaker Server.  If the "Perform Script on Server" script step on a FileMaker file that is not hosted by FileMaker Server, the script returns an error.  Scripts that are performed on the server are treated as FileMaker Server scheduled scripts.

            A script run using "Perform Script on Server" is NOT aware of the current layout or current record the client is viewing.  If required, use the Go to Layout script step and/or the Go to Record/Request/Page script step to specify which layout and/or record to act on.

            Global variables can be used if they are defined AFTER the script begins running on the server.

            Script parameters and script results are supported up to 1,000,000 (million) characters.

            If records are locked on the client machine, a script performed on the host cannot access uncommitted data or change the contents of those records until the lock is removed.

            Perform Script On Server is not compatible with a FileMaker runtime solution created with FileMaker Pro Advanced.  This is due to runtime solutions not supporting networking.

            • 3. Re: FileMaker server script scheduler error?
              user19752

              The errors occurred in "Misc - Open" script, may be attached to onFirstWindowOpen trigger.

              You could ignore the errors, the steps may not effect your purpose.

              If you want to clean log without such errors, you need to modify the script, according to suggest from wimdecorte .

               

              (I want FMS silently ignores, at least latter 2 that window steps. Developer can know there are incompatible steps in script editor, no need to be alerted.)