2 Replies Latest reply on Sep 14, 2010 11:12 AM by rwalsh

    Server Side Scripted Import/Export

    rwalsh

      Title

      Server Side Scripted Import/Export

      Your post

      I have two scripts. that have worked fine until last week. I am not sure what happened.

      They were both created with the guidlines from filemaker.

      Script 1

      • Set Variable [ $varpath; Value:"filewin:" & Get(DocumentsPath) & "order-data.csv" ]
      • Import Records [ No Dialog; “$varpath”; Update Matching; “Windows ANSI”;]

      Script yields error 100. File is missing. But the file does exist, I have checked multiple times. 

      Script 2

      • Set Variable [ $varpath; Value:"filewin:" & Get(DocumentsPath) & "NeedSpecs.xls" ]
      • Export Records [ No Dialog; "$varpath"; “Windows ANSI”;]

      Script yields error 800. Unable to create file on disk. Which I would assume is a permissions error, but its a local disk on the actual server in the DocumentsPath. How can this not have persmission to access?

      I have no idea why this has just stopped working, we have not performed any updates to the box since the scripts were written. The last time we updated was when v10.0.2.206 came out.

      error.jpg

        • 1. Re: Server Side Scripted Import/Export

          rwalsh:

          Thank you for posting.

          What does $varpath actually evaluate to? It sounds like it may be getting set to the wrong value. What happens if you type the explicit path to the Data > Documents folder on the server instead of using Get(DocumentsPath)?

          TSuki
          FileMaker, Inc.

          • 2. Re: Server Side Scripted Import/Export
            rwalsh

            It evaluates to.

            filewin:/C:/Program Files/FileMaker/FileMaker Server/Data/Documents/order-data.csv

            -or-

            filewin:/C:/Program Files/FileMaker/FileMaker Server/Data/Documents/NeedSpecs.xls

            respectively for each script.

            I have manually made the path instead, and it still results in the same errors.