5 Replies Latest reply on Jun 12, 2012 5:03 AM by erolst

    Info about any object

    johannes

      Hi all,

       

      I am using FM 12 Advanced (as a novice) and I am looking at the Invoices sample database. I found that in the customer details layout at the right hand side of the field "address 1" there is a "button". If I click that it opens Google Maps and shows the location.

       

      I found that clicking this button invokes a custum function. But I can't find anywhere a hint how this function is linked to this button. It would be nice if there were an info page for any object that shows what type it is, which triggers it uses, which scripts it invokes etc.

       

      Does anyone happen to know what type of an object the above mentioned "button" is and how the function is linked to it?

       

      Thanks in advance and best regards

       

      Johannes

        • 1. Re: Info about any object
          erolst

          The button calls a script (or rather, a single script step in this case), which uses the data in the address field to calculate a Google Maps location URL, which in turn is passed to your browser. (Note that Custom Functions and Scripts are two different things in FileMaker.) The object which acts as the button is the grey rectangle with the background fill, overlaid with a graphic.

           

          Check your FileMaker Online Help for more info. These two topics should help with your questions:

           

          Designing and creating databases > Creating scripts to automate tasks > Using buttons with scripts > Defining a button

           

          Designing and creating databases > Editing objects on layouts > Showing or hiding badges on layout objects

          • 2. Re: Info about any object
            johannes

            Thank you erolst,

             

            as far as I can see there is no script called by the button (see attached screenshots).

             

            I found that the "button" calls a script by using the sript debugger.

             

            So if I wanted to link the button to another function, how would I do that?

             

             

            • 3. Re: Info about any object
              erolst

              You got the wrong object. There are two objects on top of each other, and the button function is actually assigned to the small grey rectangle, not the graphic (to make sure you invoke the script even if your click misses the graphic by a few pixels.) The dialog box in your screenshot is not the “Script Debugger”, but the Button Setup dialog box, which lets you turn any object into a button (or change/remove the assignment); as long as nothing is assigned, the dialog box shows Do Nothing.

               

              Kuckst du hier:

              • 4. Re: Info about any object
                johannes

                That was the crucial point. I missed that simple fact. Thanks a lot.

                 

                I included the button setup dialogue because I thought the graphic was indeed the button.

                 

                Btw. I implemented your proposal on the other post regarding selecting portal records and it works like a charm.

                 

                Kuckst du hier:  <-- This suggests you understand German. Or are you German? 

                • 5. Re: Info about any object
                  erolst

                  "Btw. I implemented your proposal on the other post regarding selecting portal records and it works like a charm."

                   

                  Glad to hear it. Sometimes I suggested methods which then proved to be not entirely bug-free …

                   

                  "<-- This suggests you understand German. Or are you German?"

                   

                  Both of the above Your name and the address in the screenshot made me guess that you are, too. Have fun with FMA123!