10 Replies Latest reply on Apr 21, 2009 10:00 AM by Jade

    Hello from a Newbie, and help with opening specific records.

    kikinho

      Title

      Hello from a Newbie, and help with opening specific records.

      Post

      Firstly, hello to you all! My name is Kiko and I'm a relative newcomer to filemaker. I'm trying to find a way of using hotspots (buttons) to open specific records within a database.

       

      Essentially, I have a database of properties including owners names, addresses, details of each building, photos and our billing history with them, but I would like to link it to a map of the area. My thoughts were to have a map as an imported jpeg with transparent buttons on each property that would then take me to each specific record, but I don't seem to be able to find a way of doing it within filemakers own button options. Am I missing something or would a specific script need to be written? If so, is there anywhere I can find scripts or help with writing them? I've tried a google search, and a search on here, but I don't think I quite know what to search for!

       

      Thanks in advance!

       

      Kiko

        • 1. Re: Hello from a Newbie, and help with opening specific records.
          kikinho
            

          Hi Jade and thanks for the input. Sadly, google maps doesn;t have enough detail (that must be a first!) for what we're trying to do. We're using a modified OS map, which has each building marked as an outline.

           

          I also forgot to say in my first post that I'm using a filemaker developer 7, until funds permit otherwise!

           

          TC

          • 2. Re: Hello from a Newbie, and help with opening specific records.
            Jade
              

            Hi Kiko,

             

            Yes, I deleted my first post when I re-read your requirements.

             

            However, you can create a generic script that is parameter driven to assign to your transparent buttons.  

             

            Do you have a unique property_id field in your properties table? 

            • 3. Re: Hello from a Newbie, and help with opening specific records.
              philmodjunk
                

              Any graphic object can be set up as a button in Filemaker. To make an invisible button...

               

              Enter layout mode.

              Select either the rectangle, rounded rectangle, or oval tool.

              Create your selected shape position and size it where you want to place your button.

              While the shape is selected, choose Format | Button Setup... and select the desired button options.

              Now change the shape's fill and outline properties to transparent to make the button disappear.

               

              You can place such invisible buttons on top of your map to create your hot spots.

               

              Alternatively, you can create graphic objects in a graphics program, copy them to the clip board and paste them onto your layout. This object can also be set up as a button. So, if you have map of the United States, you could use a graphic editor to divide the map into individual states and make each one into a button in FMP.

              • 4. Re: Hello from a Newbie, and help with opening specific records.
                kikinho
                  

                Jade,

                 

                Yes, each record has a unique reference number stored in the first field, although these references are user generated.

                 

                Kiko

                • 5. Re: Hello from a Newbie, and help with opening specific records.
                  kikinho
                    

                  THanks PhilModJunk,

                   

                  I can make the buttons, just not get them to do what I want them to do! I'm trying to get each button to open a different specific record.

                   

                  TC

                  • 6. Re: Hello from a Newbie, and help with opening specific records.
                    raybaudi
                      

                    Hi Kiko

                     


                    kikinho wrote:

                    I'm trying to get each button to open a different specific record.

                     


                     

                    what do you know of those specific records?
                    • 7. Re: Hello from a Newbie, and help with opening specific records.
                      Jade
                        

                      Hi again,

                       

                      This, in rough, is the start of a script to assign to each button.  Check if you can use script parameters in your version 7 first. 

                       

                      Set Error Capture [On]
                      Go to Layout [ “yourPropertiesLayout” ] 
                      Enter Find Mode [ ]  // Deselect 'Pause' 
                      Set Field [ yourReferenceNumber; Value:Get ( ScriptParameter ) ] 
                      Perform Find [ ]

                      If [ Get ( FoundCount ) = 0 ]
                      Show Custom Dialog ["Message" ; "No Records Found."]
                      Enter Browse Mode []

                      End If 
                      Set Error Capture [Off] 
                       
                      Give the script above a name (Let's say for now 'Location' )
                      For each button, set the script step to:
                      Perform Script [ "Location" ; Parameter: "yourReferenceNumber" ]
                       
                       
                      Example:
                      If one of you buildings has a reference number of AB12345, then the script for  the transparent button should be:
                      Perform Scirpt [ "Location" ; Parameter: AB12345 ]
                      When you click that button, the script 'Location' will go to your Properties layout and:
                      1) Enter Find Mode
                      2) Set the reference number field on the layout to AB12345
                      3) Perform the find and display that property information or display an error message if no records were found. 

                       


                      • 8. Re: Hello from a Newbie, and help with opening specific records.
                        kikinho
                          

                        Thanks Jade,

                         

                        I'll give that a try now. It may take me sometime!

                         

                        Kiko

                        • 9. Re: Hello from a Newbie, and help with opening specific records.
                          kikinho
                            

                          I get the error message 'an operator e.g. +, -, * is expected here' and the text ' If [ Get ( FoundCount ) = 0 ]

                                  Show Custom Dialog ["Message" ; "No Records Found."]
                                  Enter Browse Mode []

                              End If ' highlighted when I try to save the script.

                           

                          Any thoughts?

                           

                          Oh, and am I right in thinking that it should have   :: Tablename   at the start of the script?



                          • 10. Re: Hello from a Newbie, and help with opening specific records.
                            Jade
                              
                            Hi Kiko,

                            kikinho wrote:

                            I get the error message 'an operator e.g. +, -, * is expected here' …


                             

                            The error may be due to the extra spaces and blank lines which were added in my copy and should not be there.  Or there is a typographical error in your script.  This part of the script can be deleted for now until we get it working. 

                            kikinho wrote:

                            Oh, and am I right in thinking that it should have   :: Tablename   at the start of the script?


                            Yes, the 'Set Field' statement uses Tablename::yourReferenceNumber