1 Reply Latest reply on Jun 22, 2011 12:18 PM by bueller

    "Select File" dialog for xml import

    djckai

      Title

      "Select File" dialog for xml import

      Post

      Wow this has been hard to find info about.

       

      I've been trying to set up a script that will be able to import an xml file with the minimum of effort from the user. We get an xml file emailed to us so it can be saved where ever the user wants. For this reason I would like to be able to have a dialog where the user can locate the file and it gets used. Like a "browse..." field and button.

       

      I don't want to use the normal dialog for xml import because you have the choice of choosing an xslt and also it comes up with the screen to select which fields to import. The only variable that I want chosen is the file.

       

      If this isn't possible then users will just have to remember to not change the file name and only save the file on the desktop.

       

      This is for Filemaker 10 on OSX 10.5.

       

      Thanks all 

        • 1. Re: "Select File" dialog for xml import
          bueller

          I just built a script that tackles this issue and ran into a similar issue.

          First I created an "import log" table that has a container field. When the user needs to perform an import, I have the script take them there, then add a new record. I think use Set Field to place a reference to the file I want to import into the container field. Once it's in place I use some text processing to grab the full file path and pass it in a variable called $xmlpath to the "File" option in the Import XML Dialog. Don't use the "Calculation" option even though it tells you that you can pass it a text value as a calculation - for what ever reason that will fail. Place the variable in the "File" option dialog box called "Specify File" that lets you create a "File Path List".

          Hope this helps.