4 Replies Latest reply on Jul 3, 2009 9:21 AM by donjuancarlos_1

    Export script step (client-server)



      Export script step (client-server)


      I am using the Export script step to copy a database entry plus all of its portal records. It works fine until I put it on the FM10 server and try to access it remotely.  Then, for some reason, Export will not write the temporary file.


      I found another entry in the forums that said that you cannot do this when remotely accessing a file. Am I reading this right? If so, how would you copy a record with all of its related data?

        • 1. Re: Export script step (client-server)

          If you connect to the database as a client and run a script to export the records from the client session, it should work for you.


          If you are attempting to use the Server's Scheduler to schedule the script to run from the server, then you will have many problems and probably will not be able to get this to work to your satisfaction.


          Both Import and Export scripts are nearly non-functional when run as a server scheduled script. There's a knowledge base article that you can search for on this if you need to know more.

          • 2. Re: Export script step (client-server)

            I am connecting to the database as a client.  I know about the restriction for exports, limiting them to the Documents or Temp directories.


            I have even tried


            "filewin:" & Get(DocumentsPath) & "temp.tab" as mentioned in a Filemaker article


            And the file will not write.  My script debugger gives me Error 3, which means: Command is unavailable (for example, wrong operating system, wrong mode, etc.)


            I'm stuck.

            • 3. Re: Export script step (client-server)

              I just did the following test:

              I opened a file that I am hosting from FMS 10 with a full access password.

              I created a one line script:

              Export Records[No Dialog; "newtabfile"; Windows (ANSI)]


              I clicked the first specify... button and selected "Add file" to select a file on my desk top. I then changed the file name in the file reference from the existing file to "newtabfile".

              I click the second specify button and selected a pair of fields for export.


              I saved the script.

              I then performed the script from the script manager window and it successfully exported the current found set to my desk top.


              How does that differ from what you are trying to do?

              • 4. Re: Export script step (client-server)

                It differs in the fact that I am using external authentication. When I open my main database using the Shift key and an Admin account, I didn't realize that all related databases are NOT accessed with Admin privilieges; they are accessed with the normal external authentication privileges.  And for some reason, the external authentication group I used for my line item database did not have Export enabled. 


                Well, good to know.


                /embarassed, but wiser