2 Replies Latest reply on Oct 28, 2015 7:18 AM by dcoryh192

    Retrieve path of Drag and Dropped File

    dcoryh192

      Hi

       

      I am trying to make a database application as a library for my CAD software (Altium). I need to be able to store the path to individual Altium files that correspond to different parts. I have a script working that uses the Insert File dialog to store the reference of the file in a container, then parse that and convert it to the proper path format and store it in a text field. I would like to add drag and drop functionality to this as well.

      I have been looking around and it doesn't look like it is possible to insert a file as a reference when dragging and dropping. It will always be embedded (or stored in an external location, which I do not want).

       

      Is it possible to drag and drop, let the file be embedded, find the path that it came from, then delete the file from the container? All I want is the path of the file, but it would be a little inconvenient to use the Insert File dialog every time, especially since you can't seem to give it a default path to open up to.

       

      Using FileMaker Pro 14 on Windows

      Thanks!

        • 1. Re: Retrieve path of Drag and Dropped File
          user19752

          I made a sample using web viewer. Works only on Windows.

           

          known issue: if user drop folder (not file), FileMaker try to convert contained files as data. (same behavior as dragging from explorer to container)

          • 2. Re: Retrieve path of Drag and Dropped File
            dcoryh192

            Thanks for making this!

             

            I think this will definitely solve my two issues (opening browse to a specified location & drag and drop path). It's an interesting method and I think I can make it work.

             

            The only problems that I can see are if you drag a file from explorer into the container file, it will still pull the path from web viewer. I wonder if there is a way to restrict this. I bet I could search the web viewer path for the file dropped in the container. If it isn't there, then display an error.