6 Replies Latest reply on Dec 26, 2013 6:41 PM by PrisonProfessor

    Layout object as hyperlink



      Layout object as hyperlink


           I have a layout that is a profile/contact of various organizations. I want to make one of the objects/fields a link to the organization'a webpage.

           I attached the following script to the object. Open URL [No dialog; "http://www.filemaker.com/"]

           I thought i could make it unique to each organization but don't see how to do it. Is there a way just to simply add a unique hyperlink to each profile?

        • 1. Re: Layout object as hyperlink

               Yes, I do this often.

               You have a URL field where you enter the organizations URL and then you create a button (Or a graphic like a png image) and attach the Open URL script step.

               The trick is going in the Open URL settings and specifying the URL field as the URL that needs to be opened.

               You should be able tos specify a calculation or maybe even a field.

               As a calculation just select the field name.




          • 2. Re: Layout object as hyperlink

                 As expected I'm still not getting it right.

                 I have a table "ProfileResourcePartners" and within that table a field "PRP_Website" I have a layout 'ProfileResourcePartners' and within that layout an object that corresponds to the field "PRP_Website"

                 It is my objective to have user when they click on the object "PRP_Website" to open the URL that is populated into the field 'PRP_Website"

                 I've created a script "URL" which contains the command 'Open URL [No Dialog; "ProfileResourcePartners::PRP_Website"

                 I've tried configuring the field "PRP_Website"  as both a calculation and text using the formulas PRP_Website = ScriptNames ("URL") & ScriptIds ("URL")

                 I've configured a button to as an object and when clicked to "Perform Script ["URL"]

                 The best result is the button but it open a blank window. 

                 I'm still consider myself a newbie to FMP especially when it cones to scripts & calculations so I need detail in the various steps


            • 3. Re: Layout object as hyperlink

                   Your open URL step should look something similar to this:

                   Open URL [No Dialog; Table::URLField ]

                   where you would put a reference to the text field where you enter the URL in place of the Table::URLfield I've used in this example.

                   If you open the Known Bugs List Database, and go to the Reports layout, you'll find several URL fields with an "open URL" button to the right of each. You can see the text in the field, and can open up button setup to see the name of the script and you can open the script to see how I set this up.

              • 4. Re: Layout object as hyperlink

                     Wasn't able to do it from scratch so cheated copied yours and changed parameters and think I have a clearer understanding but since your button is working will stay with it.

                     Not that is is a biggie but the button has the text "Open URL" is there a way to change that?

                     Thanks again Phil

                • 5. Re: Layout object as hyperlink

                       In Layout mode, click the text tool then click the button.

                  • 6. Re: Layout object as hyperlink

                         Yeah, got it with out having to scratch the head laugh