3 Replies Latest reply on Mar 18, 2013 8:21 AM by BowdenData

    Send link to database from Script?

    carlsson

      I can't find a way to send link to database (located on a server) with a script.

      Is this not possible? (ie, the same url as the function "File > Send > Link to database..."

       

      Get(FilePath) returns an URL that starts with "fmnet", it should start with "fmp".

        • 1. Re: Send link to database from Script?
          BowdenData

          Hi,

           

          Not in FMP at the moment, but can't you just build the URL string manually? Sounds like Get(FilePath) is almost what you want. If so, create a script and set a variable to the value of Get(FilePath), then use the substitute command on the contents of the variable to replace anything you need. You might have to also substitute spaces in the dB name with "+" characters.

           

          Could also build the string manually. Something like:

           

          "fmp://" & get(hostname) & "/" & substitute( get(filename) ; " " ; "+" )

           

          Then use the Send Mail command to open a new email message with your built string in the body along with any other text you want. Could copy the text when you use the Send Link to Database... manual command if you want.

           

          HTH.

           

          Doug

           


          1 of 1 people found this helpful
          • 2. Re: Send link to database from Script?
            carlsson

            Doug,

             

            thanks for the answer.

             

            I was thinking about building the URL, but that would be unnecessary if the function was hidden somewhere that I didn't notice.

             

            Thanks,

            /andreas

            • 3. Re: Send link to database from Script?
              BowdenData

              Understand. I double checked this morning when I had FMP12 open and they don't have the Send Link equivilent in the script manager, so building it yourself is the way to go.

               

              Doug