10 Replies Latest reply on Jul 14, 2015 3:00 PM by Atcha

    Support for hypertext links?

    Atcha

      Title

      Support for hypertext links?

      Post

      Hi,

      I am setting up a solution and would like to use the ability of my Reference manager (Bookends) to generate hypertext links to its own records and insert these links into a Filemaker field so that all I need to do is click on the link and it will start the Bookends application and display the correct record. Unfortunately it does not look as if Filemaker accepts such links. has anyone ever come across this and do you know a possible work-around (plug-in)?

        • 1. Re: Support for hypertext links?
          philmodjunk

          "hyperink" almost always means URL text. If this is what you mean, Open URL can be used with the URL text stored in a text field to produce the results of a hyperlink. You can show the text in a field and format the field as a button such that clicking the field opens the URL. You can also choose to put a button next to it and use it to open the URL.

          You could even use two fields with the visible field showing the typical "label" text of a hyperlink and hidden field can store the URL text to be used with Open URL when the "label" field is clicked.

          • 2. Re: Support for hypertext links?
            Atcha

            I am afraid that to the best of my knowledge that is not what is meant. The maker of Bookends explained: "You can insert hypertext links into a document from any application that understands URIs (for example, TextEdit or DevonTHINK Pro). I don't have Filemaker, but if it understands them you could do this."

            When I try this in Filemaker the cursor changes to a block showing that it is trying to copy a reference but Filemaker does not accept the input (I tried both text and container fields). When I copy the same into e.g. TextEdit it does not copy a regular text link but something other than that.

            In a later mail he stated: "Not all application support URLs, which is why I mentioned two that did (you can confirm that you're doing it correctly with TextEdit). If you are, and FileMaker won't accept it (which sounds likely), then it would seem FileMaker doesn't have that capability. Although a quick Google search shows that it supports the opposite (responding to a URL):

            http://www.filemaker.com/help/12/fmp/ht ... .16.7.html"

            Hence my question.

            • 3. Re: Support for hypertext links?
              philmodjunk

              This should be possible. A URL is simple text that would look something like this:

              <a href="https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip" target="_blank">VisibleTextHere</a>

              In some applications such as your browser, this becomes:

              VisibleTextHere

              In FileMaker, you could put: https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip into a text field and the OpenURL script step will open that URL. If you want the full functionality, you'd use a second field to store VisibleTextHere and set it up as a button to click--with the Open URL still set up to open the URL specified in the first field.

              • 4. Re: Support for hypertext links?
                Atcha

                I am not so sure this is all there is to it. I tried to get the maker of Bookends to say something about the nature of the URL link that is being copied, but he never answered that question. So I started my HTML editor and tried to drag a Bookends URL link into it. It did not work. I then did it in TextEdit, where it does work, and it gave me the title of the work I dragged into it in underlined in blue (see screenshot below). I selected the link and chose "Copy Link" and pasted the result into Filemaker. No go. What I got was this: "bookends://sonnysoftware.com/82829" This is a reference to the program and the unique key of the relevant record but it does not resemble a URL at all.

                I guess the question is what allows some programs to accept the Bookends URL link and others not? My suspicion is that these URLs are OSX specific and combine a URL with a (Apple?) script.

                I did some more research and discovered I can copy these URL links to the Mac desktop as well, where they appear with the "inetloc" extension. These are internet location files associated with Finder. Anyone any idea how we can put this knowledge to good use in Filemaker?

                PS. I also tried dragging an inetloc file into Filemaker and ended up with the same text link mentioned above ("bookends://sonnysoftware.com/82829"). I guess the URL part of the reference is hidden in the resource fork of inetloc which is not copied when such a file is copied or dragged into a program that does not know how to handle such files.

                • 5. Re: Support for hypertext links?
                  philmodjunk

                  Note that the format shown in your screen shot is the same as the live Link in my previous post. Hyperlinks consist of two parts, The visible "label" text that is usually shown in blue and underlined and the (usually) hidden "link text" that specifies the actual URL.

                  If you enter

                  bookends://sonnysoftware.com/82829

                  into Safari, does it work?

                  does
                  Http://bookends://sonnysoftware.com/82829

                  work?

                  does

                  file:///bookends://sonnysoftware.com/82829

                  work?

                  Is this something located on a web site or in an application installed on your computer?

                  • 6. Re: Support for hypertext links?
                    Atcha

                    He, you are right, if I try the "bookends://sonnysoftware.com/82829" link in Firefox it kind of works. By that I mean that I get a message asking me if I want to launch Bookends. If I answer in the affirmative it passes me straight on to the reference manager and the correct record. If I do it in Safari I go straight to the relevant record. Do you mean to say that despite the fact that "bookends://sonnysoftware.com/82829" looks like straight text, it is actually a hyperlink? If so, where is the URL?

                    Anyway, "Http://bookends://sonnysoftware.com/82829" also works but "file:///bookends://sonnysoftware.com/82829" does not ("Safari can't find the file").

                    The record it refers to is located inside a Bookends database on my machine.

                    Could I just enter such links as "bookends://sonnysoftware.com/82829" into a text field in FM and then use a script (Open URL) to open the contents of the field? That would be awesome!

                     

                    • 7. Re: Support for hypertext links?
                      philmodjunk

                      bookends://sonnysoftware.com/82829 IS your URL text. the text shown blue and underlined in your earlier screen shot is the label text.

                      So what happens when you use:

                      Open URL ["bookends://sonnysoftware.com/82829"]

                      or

                      Open URL ["Http://bookends://sonnysoftware.com/82829"]

                      Insert From URL, even though you aren't actually inserting data into anything, might also be worth a try.

                      But it may be that FileMaker cannot use this type of URL to launch another application...

                      Does that work?

                       

                      • 8. Re: Support for hypertext links?
                        Atcha

                        I just tried it with Open URL but what happens is that clicking on the field with "bookends://sonnysoftware.com/82829" in it switches me to the open browser where I am told the address isn't valid. Adding http:// in front results in the same message and so does adding "file". I also tried Insert from URL but that doesn't work either. It looks as if I am back where I started. What do you think, is it worth worth bugging the FM support people about this?

                        • 9. Re: Support for hypertext links?
                          philmodjunk

                          Don't know if it is or not. My guess is that the need to open another application is what keeps this from working. Wonder if Send event could be used?

                          • 10. Re: Support for hypertext links?
                            Atcha

                            I am not familiar with this command but will give it a further try tomorrow. First experiments only let me switch to Bookends but not to the correct record. If I specify the application to be opened I am not sure how to also send an "argument" across.