8 Replies Latest reply on Feb 13, 2015 4:58 PM by user19752

    Export Records on WebDirect on Safari 8

    ideawise

      I have a script containing the "export records" step which works fine via WebDirect on earlier versions of Safari.  The output file is named via a variable and specified as a "merge" with .csv extension.  (it still pops open a new tab, but at least it downloads the file).

      However, testing on a new Yosemite/Safari 8 client, the export step doesn't work at all.  No download whatsoever. 

      In fact it throws error code 3: "Command is unavailable (for example, wrong operating system, wrong mode, etc.)"

      Again, it works fine on earlier versions of Safari, just not the current version.

      Any insight on this would be EXTREMELY welcome.

      Thanks in advance,

      David

        • 1. Re: Export Records on WebDirect on Safari 8
          mikebeargie

          I've been running all "export record" commands server side, where I can guarantee compatibility. I pass the found set up to PSOS, reassemble the found set and export it to the servers temp folder. I then throw the resulting export into a global container field for the user to download.

           

          try throwing a container field with a sample file in it on a test layout to see if you can click on that and get the contents. If so, then you might want to alter your method to export server side.

           

          And as always, FileMaker only supports a limited browser set, any versions outside of that can (and very likely will) have some odd behavior.

          • 2. Re: Export Records on WebDirect on Safari 8
            ideawise

            Hi Mike.

             

            Thanks for responding.  That's an interesting possibility.  Question though.  I'm good with how to do most everything in your suggestion, but how do you put the file into the container field?  Most of the "Insert" script steps I use to do that are not server compatible.

             

            I'm already doing a "PDF print" job thing where people are downloading PDFs from containers.  But mileage varies by browser and platform (as this original post mentions).  I'm still trying to get official word on whether this export script step which works on previous versions of safari, somehow doesn't work on the latest version.  Anyone know?

             

            By the way, it makes me nervous running a server script without being able to see it in debugger.  I've seen some methods for logging the progress, but it's still dicey.  How do you address this?

             

            Thanks again.

            • 3. Re: Export Records on WebDirect on Safari 8
              mikebeargie

              I believe in the past I’ve used Insert From URL instead of Insert File.

              • 4. Re: Export Records on WebDirect on Safari 8
                ideawise

                Ok Mike, until I hear back about export compatibility with the new version of safari I'm trying your method.

                 

                Question though.  I'm testing using insert from URL, but not having a lot of luck.  Thinking maybe I'm formatting it wrong.  I'm exporting the file to "Temporary Path" because that's what I think I'll need to do on the server.  Keeping that path and filename in a variable.  Then going to the layout with the container, selecting the container, and using "Insert From URL" with the variable as the value, and no dialogue, full privileges, etc. 

                 

                I'm testing locally first so I can see what's happening.  I've tried it with the bare variable,  with it prefixed by "file:" and "filemac:" (when I actually run it on the server it will reflect the windows platform).  The file is created but nothing is ever inserted into the container.  Am I missing something?

                • 5. Re: Export Records on WebDirect on Safari 8
                  ideawise

                  I discovered that it was some kind of access privilege issue actually.  My mistake. 

                   

                  Still interested in your method mike and whether I could make that work on the server.  No luck using "Insert from URL".  What format do you use?

                   

                  Thanks

                  • 6. Re: Export Records on WebDirect on Safari 8
                    user19752

                    Tested on Windows7

                    "file:/" & Get ( TemporaryPath ) & $anyFilename

                    worked.

                     

                    global field will not work.

                    • 7. Re: Export Records on WebDirect on Safari 8
                      ideawise

                      Thanks, I thought I tried that and "filewin:/", but I'll check all the details and try again.

                       

                      Appreciate the response.

                      • 8. Re: Export Records on WebDirect on Safari 8
                        user19752

                        "filewin:" and "filemac:" are file reference syntax in FM, not URL.

                         

                        I did more test just now, simplest script running on local file, in "Insert from URL"

                        "filewin:c:/some/existingfile" and

                        "filewin:/c:/some/existingfile"  returns error 1631 (can't connect).

                        "filewin://c:/some/existingfile" returns error 1626 (unsupported protocol).

                        The error is not same with one slash... I assume first 2 strings are treated as "http://filewin:~~~".