2 Replies Latest reply on Feb 22, 2012 1:46 PM by disabled_scibidoo

    Importing XML in server side script FM SERVER 10



      Importing XML in server side script FM SERVER 10

      Your post

      I have been importing orders into my dbase by having my ordergenerating software export an XML document and using an XSL transformation to import from a client running fm pro 10. The DBase is hosted on FM server 10 so I had this dream of automating the importation so that the person processing orders is no longer stuck clicking the import button.


      All Along I have been dropping these files into the server documents folder and then the script from the client would go get them.


      However when I converted the script over to run server side it doesn't work. my log looks like this:

      2009-05-22 14:56:11 Server Events Information Schedule "Test" running.

      2009-05-22 14:56:11 Server Events Information Schedule "Test" has started FileMaker script "XMLIMPORT".

      2009-05-22 14:56:11 Server Events Information Schedule "Test" scripting error (718) at "ImageFlowDevelopment : XMLIMPORT : Import Records".

      2009-05-22 14:56:11 Server Events Information Schedule "Test" completed; last scripting error (718).

      2009-05-22 14:56:11 Server Events Information Schedule "Test" scheduled for 05/23/2009 02:51 PM.


      This is confusing me greatly; I know 718 is XML parsing error which makes no sense because I am certain both the XML and XSL files are formatted properly because I can import them client side.

       Anyway If anyone has any ideas i would appreciate it.


      Here is the simple version of the script. If I could get this one import working I could build from there i am sure



      * XMLIMPORT*


      set error capture [on]


      allow user abort [off]


      goto layout [serverorderinformation(orderinformation)]  *this is a dedicated layout for server scripts. no triggers/formatting


      Import Records[nodialog; "file:" &Get(DocumentsPath) & "15498_XMLTemplateTest.xml"; "file:" & Get ( DocumentsPath ) &

      "ORDERINFO.XSL"; Add; Windows ANSI]







        • 1. Re: Importing XML in server side script FM SERVER 10



          Thank you for your post.


          Close all files on FileMaker Server 10 and quit.  Put a copy of FileMaker Pro 10 on the server and open the database file.


          For now, don't use the script.  Instead, pull down the File menu and select "Import -> XML Data Source..." and enter the path and filenames directly.  If this works, then try using the the path as a calculation using Get (DocumentsPath).  If this works, then try the script.  Somewhere, the process is breaking down, so you will need to do a little sleuthing.  Once you get it working, then quit FileMaker Pro, start FileMaker Server and open the file.  Then, try again from the client side.


          Please continue to update the forum with your progress.



          FileMaker, Inc.

          • 2. Re: Importing XML in server side script FM SERVER 10

            We are running 10.7.3 and FM Server and have a script running every 5 mins importing with a stylesheet. At random times the 718 error is occurring and of course there is nothing in the logs that elaborates on what the error is.

            If I run the process on Filemaker Pro 11 client using the same script and XSLT the error is not reproduced.

            To correct this stopping and restarting the service works, however this means kicking off all users at the time and isnt a proper workaround.

            More detailed error reporting is required here please !!!