6 Replies Latest reply on Nov 20, 2013 10:14 AM by beverly

    Server Side import xml


      I am playing around with server-side import to get my hands wet. For that purpose I first export the XML file, after which I would like to import the xml file again. The first part of the script works (Both on FMPA and FMS). If I add the "Import Records' script step, I got the script error (FMS). It works correctly in FileMaker Pro.


      Does anybody has an idea how to debug this?



      Screen Shot 2013-11-19 at 11.17.35 AM.png

        • 1. Re: Server Side import xml

          This is usually a problem that the FileMaker service cannot read the folder that you are wanting to import.  Unless you do some unusual things, FileMaker's Import (and export) can only see things in the "FileMaker Server/Data" folder which is in either your Library or Programs folder, depending if Mac or Windows.  I find it best to store it in the "FileMaker Server/Data/Documents" folder, but you can also store it in the TEMP or Desktop. 


          PS:  This is a standard security to sandbox where applications can read/write so that they can't be hacked and turned into a virus. 

          1 of 1 people found this helpful
          • 2. Re: Server Side import xml

            "Store it in TEMP",  Taylor?

            .... only if you want to lose it forever.....


            TEMP is not a permanent storage spot. It can be used to TEMPorarily park a file for immediate use elsewhere...


            (I know this is what you really meant :-)


            - Lyndsay

            • 3. Re: Server Side import xml

              Get(documentsPath) resolves correctly to the FileMaker Server/Data/Documents. Actually : HD/Library/FileMaker Server/Data/Documents/ . The whole $filepath is then

              file:/Yucca/Library/FileMaker Server/Data/Documents/Export.xml . I write the exsport file there. So I got that part work.


              I double checked end that Documents folder is

              drwxrwxr-x  6 fmserver  fmsadmin  204 Nov 19 10:30 Documents

              The file itself is

              -rw-r--r--  1 fmserver  fmsadmin   241824 Nov 19 10:30 Export.xml

              So we should be OK here. (Just in case I did a sudo chmod 777 but alas).


              I think the scipt error might indicate that it has trouble executing the script step import. Maybe it can not mach the fields. Is there a way to test that? the Server log says:


              There is not enough XML/XSL information to proceed with the import or export

              Any ideas what the server expecting here?

              • 4. Re: Server Side import xml

                Is the schema/format/grammar of the importing XML source in FMPXMLRESULT? If not FMP/FMS will not import. You must use other methods (XSLT, for example) to transform the source XML into the proper grammar.


                -- sent from my iPhone4 --

                Beverly Voth


                • 5. Re: Server Side import xml

                  Thanks Beverly. I set the import 'Data source' from 'File'. Once I changed 'Data source' to 'xml' is worked.


                  I am not sure why FM does not consider 'xml' a 'File'.


                  BTW I am using no stylesheet for the exsport but the grammer FMPXMLRESULT. So for the import I use no grammer at all. (Checkbox is unchecked). Is that correct? 

                  • 6. Re: Server Side import xml

                    That is correct, oak. Export from FileMaker with this grammar (reminder: do NOT use FMPDSORESULT!) will allow Import (with or without creation of a new table) into FileMaker. No XSLT needed if it's already FMPXMLRESULT.