7 Replies Latest reply on Aug 7, 2012 6:42 AM by wimdecorte

    Export XML via ScriptStep

    greginchrist

      I am able to export a working XML file manually through the "File" menu "Export". However I am not having luck getting an XML file via a script. I did see in the FMP documentation for exporting that the resulting file needs to be output in the documents folder or tempery folder.

       

      The FMP server is logged in as username: Admin and the export script step is telling the script to export the XML document to a sub forler of the Admin users documents folder.

       

      I have a button linked to run the script I created. Nothing seems to happen.

       

      Does it sound like I am missing something? Or does someone know of a walkthrough or video showing the process?

       

      Thanks a ton!

        • 1. Re: Export XML via ScriptStep
          wimdecorte

          greginchrist wrote:

           

          The FMP server is logged in as username: Admin and the export script step is telling the script to export the XML document to a sub forler of the Admin users  documents folder.

           

           

          FMS can export only to a temp folder and to its own Documents folder, not any user's documents folder.  You'll find the FMS documents folder inside the FMS "data" folder.

          • 2. Re: Export XML via ScriptStep
            greginchrist

            wimdecorte wrote:

             

             

            You'll find the FMS documents folder inside the FMS "data" folder.

             

            I thought it was talking about a users documents folder.

             

            It's still not playing nice. Does the following seem right?

             

            filemac:/ServerName/Library/FileMaker Server/Data/MySubFolderName/MyFileName

             

            That is the path I get when I use the FMP GUI to select my export location. However I am actually travailing the finder to...

             

            DiskName/Applications/FileMaker Server 8/Data/MyFolderName/myFileName

             

            Note: I am not selecting a file name I am adding it when the GUI asks for the file name.

             

            Note: The "data" folder apears to be an alias. I am still looking in the wrong place?

            • 3. Re: Export XML via ScriptStep
              nickorr

              greg,

               

              Use the get function Get ( DocumentsPath ) and then put any sub folders inside that.  From the url above it looks like you're one step up from the documents folder, into the Data folder, which won't work.

               

              Cheers,

              Nick

              • 4. Re: Export XML via ScriptStep
                greginchrist

                Could some one write out a had path to where theses folders are suppored to reside. I think some one may have deleted the documents folder on my end or because I am running an old version of FMP Server (Version 8). Maybe that folder was not used back then??

                 

                I don't see the folder and I can take different paths because in the FMP Server Folder there is a alias folder called data.

                 

                So my path without the alias is

                 

                HardDiskName/Library/FileMakers Server/Data/

                 

                Inside that Data folder is a Temp folder but not a Documents folder, and the script still does not seem to output to the Temp folder either, which I thought the documentation said it would.

                 

                Am I in the right location or am I still confusing something?

                • 5. Re: Export XML via ScriptStep
                  greginchrist

                  I am just learning the FMP scripting interface. I am working on using the Get ( DocumentsPath ) function but I have not been able to understand how to use it yet.

                   

                  If I understand correctly it should tell me the path of the DB file itself????

                  • 6. Re: Export XML via ScriptStep
                    wimdecorte

                    Doubt that many people here still have 8 installed to verify that for you.

                    You may want to reinstall from scratch if you think the default folders have been tinkered with.

                    • 7. Re: Export XML via ScriptStep
                      wimdecorte

                      Get(DocumentsPath) will not return the path to the file itself, it will return the default OS documents folder for that user (the user's profile).  When executed on the server it will return the location of the FMS default documents folder (not the logged-in user's documents folder nor the fmsadmin account documents folder).