7 Replies Latest reply on May 7, 2015 4:17 PM by argasoft

    Download from webviewer.

    argasoft

      Title

      Download from webviewer.

      Post

      Hi!

      I often use the webviewer to search for manuals for my apparatuses.
      I wonder if there is a way to set a field with the address of the file I downloaded while using the webviewer without copying and pasting.

      TIA
      Arnaldo

        • 1. Re: Download from webviewer.
          rouelf_1

          I presume you mean to save the URL ?  It could be done with a one button name "Save" and run a script to capture the URL into a text field with Set Field [Table::FieldName ; GetLayoutObjectAttribute ("WebViewer1" ; "source")] . The web viewer would have an object name such as WebVewer1.

          • 2. Re: Download from webviewer.
            argasoft

            Hi!

            Thanks for replying.

            I did not mean this, but the local directory (D:/Directory/manual.pdf) where I download the file.
            At the moment I:
            1. search for the file in the web with Webviewer
            2. download the file
            3. use a plugin to go to the directory where the file has been downloaded
            4. save the address in a field

            I'm wondering if the 3rd step can be skipped.

            Thanks, again.
            Arnaldo

            • 3. Re: Download from webviewer.
              rouelf_1

              If you will always save it to the documents folder, you could do the “Save” button running a script containing the following lines:

               

              Set Variable [$FilePath ; ValueGet (DocumentPath)]

              Set Field [Table::FieldName ; "file:" & $FilePath & "FileName"

               

              You can use the "Custom Dialog" to type and save the name of the file into a field. Then use this name as the FileName above.

               

              • 4. Re: Download from webviewer.
                rouelf_1

                Arnaldo, you can also save the "Manual" into a "container" field. That could be useful.

                • 5. Re: Download from webviewer.
                  rouelf_1

                  Noticed that you are using Windows, this link maybe useful for creating "file Paths": http://www.filemaker.com/help/13/fmp/en/html/create_db.8.42.html

                  • 6. Re: Download from webviewer.
                    philmodjunk

                    Take a look at the Insert from URL script step. You can use it to insert a file from the web into a container field. From there, you can export the file to the desired location on your computer and save the specified filepath in file or just re-insert it from the new location with "store a reference" enabled. And this would all be by script.

                    • 7. Re: Download from webviewer.
                      argasoft

                      Many thanks for your hints.

                      I always save to one "main" folder (let's say "Job Manuals") and a sub-directory with the name or the manufacturer containing the manuals of this manufacturer.
                      I have many manuals (sometimes they have also 100 pages and more) and having each one in a container would, I guess, increase the size of the db enourmously.
                      I prefer to save to HD as, here in Italy, connection problems aren't rare and also because I'm trying to write an application that can be used everywhere (also where there's no way to have a connection).

                      I just thought to have something which is, as we say here, "stupid-proof" and given that  if I download something the next time Windows brings up the last directory used, I imagined that there's a place where this "last save to directory" is written and, hence, somehow obtainable.

                      But, obviously, it's not possible.

                      Thanks anyway and till next time.
                      Arnaldo