3 Replies Latest reply on Jul 18, 2017 10:04 AM by Mike_Mitchell

    Export a subset of records on the server using web direct

    scossu

      Hi,

       

      We use Web Direct on Filemaker server 14. We have a solution that work on web direct with more then 10 contemporary users.

       

      We need, when a condition happen in a new inserted record (a field filled with specific content), to export this record in a external filemaker file stored in the same folder of our solution. We can call FileA the database used via Web Direct and FileB the second one. So, after a day of work, FileB will contain a sub set of records of FileA. It is possible using web direct?

       

      If not,  we will set a schedule script to import the subset of records overnight, but I prefer to import in FileB as the data is loaded on FileA.

       

      Thank you

       

      Simone

        • 1. Re: Export a subset of records on the server using web direct
          Mike_Mitchell

          Exporting to FileMaker files is not supported server-side. You'll need to export to tab-separated text (or another supported format) and then run another script to pull the data into a database, if that's what you need.

           

          What is the workflow you're trying to achieve here? If you just want to move from file A to file B, why not host file B and run the script directly?

          • 2. Re: Export a subset of records on the server using web direct
            scossu

            Hi Mike, thank you very much for answering.

            I tried using a temp file, but don't work. Also a csv (or tab) on web direct is downloaded in browser download folder (I tried it)... So I will use a solution based on scheduled script managed by Filemaker Server.

             

            FYI my workflow is just to move from File A to File B, but File A is filled via WebDirect. Also if I host both on Web Direct, in the same folder, I cannot run a double scripts to Export on a tab-separated text file and then import from this tab-separated text file, because I cannot place the temp tab file in a position accessible by File B script...

             

            Kind regards

             

            Simone

            • 3. Re: Export a subset of records on the server using web direct
              Mike_Mitchell

              scossu wrote:

               

              I tried using a temp file, but don't work. Also a csv (or tab) on web direct is downloaded in browser download folder (I tried it)...

               

              The suggestion would have been to run it using Perform Script on Server. The point is, however, the FileMaker file cannot be created server-side. The Export Records script step doesn't support it when run on Server.

               

              FYI my workflow is just to move from File A to File B, but File A is filled via WebDirect. Also if I host both on Web Direct, in the same folder, I cannot run a double scripts to Export on a tab-separated text file and then import from this tab-separated text file, because I cannot place the temp tab file in a position accessible by File B script...

               

              Again, run it either using PSoS, or using a schedule. You don't have to host both files using WebDirect (although you can). You simply run a script in File B that imports records from file A. You can run that as a server-side script, and there's no reason to export to a temporary file at all.

               

              On top of which, if File B is hosted on Server, you gain all the benefits of doing so (like automatic backups, etc.). Unless you need to interact with a resource outside of FileMaker, I'm still confused as to the need to create an external file via export.