4 Replies Latest reply on Sep 5, 2009 6:54 PM by jla_1

    Set image path via user/button input



      Set image path via user/button input


      I have a calculation field that does:


      "imagewin:/c:/images/" & IMAGES::IMAGE1


      with the result being a container.


      I'm trying to create a button that would prompt the user for the location of the images (maybe via a Explorer win) to be used.  I'm thinking a variable, but I'm honestly not sure where to begin  Is FM capable of input like and what is the best way to go about this?  Thanks.

        • 1. Re: Set image path via user/button input
             YOu can look into a plugin such as Troi File or wince you are on Windows MooPlugin. It will allow you to choose directory and file paths.
          • 2. Re: Set image path via user/button input

            I download MooPlug and its seems to offer the tools I would need.  I can't seem to figure out the basic steps.  I have an opening menu layout and I wanted to assign a button that would allow the user to click it, get a diaglog box to browse to a folder, then select it and that would save it as the default folder.  My folder is currently set by a calculation field with "imagewin:/c:/images/" & IMAGES::IMAGE1


            How can I go about setting that /images/ as a variable that is set by the button?  Is it possible to make it stick throug file open/closes or would it only last per session?

            • 3. Re: Set image path via user/button input

              I think both plug-ins allow you to set the default folder where the dialog first opens. From MooPlug documentation: Moo_DialogFile ( bOpensTitlesDefault )


              I assume you are talking about the path to the folder where you want the "pick the file" to start? You could store either be the last folder they used, which you could parse from the file path, or it could be a persistent specified user folder, which you would the plug-in's folder dialog to get. 


              Is this a hosted environment? Or just a FileMaker file on the user's computer? It makes a big difference, as a hosted file must do a lot more work to know "who" each person is, since the FileMaker file is actually on the server, and the user just has it open on their computer.


              P.S. You would need to set this "default folder path" each time the script ran to pick a file, since it is parameter of the plug-in command.

              • 4. Re: Set image path via user/button input

                Solved this using the MooPlug. If anyone wants to know how, let me know.