4 Replies Latest reply on Feb 2, 2009 6:06 AM by carlsson_1

    Go to record with external URL



      Go to record with external URL


      Hi folks,
      I want to go to a certain record in a certain table on a certain layout.

      I want to mail a colleague about a record in our databse. It would be great if I could include an URL to that certain record in the mail, so it's simple for him to go to the record.
      Any ideas? 
      We are on FM10.

        • 1. Re: Go to record with external URL

          Hi carlsson,


          Welcome to the forum!


          Here's an outline idea:


          - Create a script to capture the current layout name using Get(LayoutName) and the current record number using Get (RecordNumber).  If the current layout is in list view you will have to have selected the correct reocord, obviously.  (For convenience make the script a Shortcut in the Scripts menu).

          - Put the two components together with a separator; a pipe, say '|', and store that value as a '$Variable'

          - Freeze the screen and go to a 'Utility' layout with a global utility text field 'text_g' and set the field to be the $Variable value.

          - Copy the contents of 'Text_g'.

          (Those last few steps were only to get the calculated value to the clipboard for subsequent pasting into an e-mail.  Depending on how often you do this and howflexible you need to be each time, you could simply stick this calculation straight into a script-generated e-mail.)

          - Open an e-mail and paste the calculated 'URL' in to it.




          - Create a second script called 'SeeRecordFromURL'

          - Have it pop up a  dialogue asking the user to paste the 'URL' you sent into a utility global field.

          - Have the script parse out the pre- and post-pipe components; hence the correct layout and record number to navigate to.

          - Have the script GoToLayout 'By calculation...' and send it to the parsed-out layout name.

          - Similarly, GoToRecord. Or use 'Find'...


          I know that explanation is very rough, but it might just work (though I haven't tried it!).


          You can also send a 'URL' link in the usual format to open the actual database, but joining the two together might be fun...


          Hope that quick thought helped?



          • 2. Re: Go to record with external URL

            Thanks for the tip!


            The optimal solution would be to have an actual URL though.


            As you probably know you can create an URL to the database with this syntax:

            "fmp7://<IP or domain>/<Database name.fp7>"


            If this could include layout and record ID somehow that would be great. Eg:

            "fmp7://<IP or domain>/<Database name.fp7>/<LayoutName>/<RecordID>" 

            • 3. Re: Go to record with external URL



              - Can't think how to tag an 'non-URL' syntax on to the end of a 'true' URL, and not get a 404-type error

              - Can't think how to pass the 'extended URL' to Filemaker, as it would not have been copied to the clipboard as I assume you want a direct click-through.  But if you could, then parsing out the 'extended bit' would be possible.




              • 4. Re: Go to record with external URL

                Don't be sorry, it's not your fault! ;)


                However, I think everything after the database name can be handled by FM. I think this of two reasons:

                -  If you make an ftp://-URL then the browser directs you to the default FTP application, no matter what you write after the ftp://

                - I i make an fp7://-URL with correct database name but just bogus after the last slash, I still get to the correct database.


                However, I'm not an expert on URL's and how they are handled, but it feels like this can be solvable if Filemaker wants it to be.


                Maybe I should also say that I'm on OS X.