1 Reply Latest reply on Jun 9, 2017 8:08 AM by mikebeargie

    Create a research button related to different field




      I just started on FileMaker Pro and have the version


      I am trying to make a database and would like to make on a layout "Human MENU" different fields ( "Freezing Date", "Initials", "Patient ID",..., "Origin") like on the picture

      and that we can fill as many fields as we want. For example only fill the "Freezing date" and the "Patient ID" out of the 7 possible fields and then click on a button that will move you to the Layout "Human Database" and only show results that correspond to all my fields at the same time.

      When I say fill in I mean choosing in a drop down list that I already created for each field.



      For now I am capable of doing so but only with 1 field, I don't know how to make a button that is "connected/linked" to several fields...

      This is how I did it on another file:


      "Tube Location_DT" being my database where I want to see the result.

      Like that I can sort my database by the category "Designation of Tissue" with only the records that correspond to what I enter in this "Designation of Tissue" field.



      Thanks in advance for the help!




        • 1. Re: Create a research button related to different field

          Hi Juca, support for filemaker 12 is already discontinued:

          FileMaker announces the end of support for FileMaker 12 product family | FileMaker

          If you are a new user, it's highly recommended that you use the latest version, FileMaker 16.


          I think I understand what you are trying to do, but it may not be the best way to do it.


          You do not need a relationship between Human MENU and Human DATABASE in order to do what you want to do. You may not even need the Human MENU table at all.


          For this type of thing, a lot of people use global fields. You may want to watch this great instructional video on "search field scripting" for some ideas.

          FileMaker Tutorial - Search Field Scripting - YouTube


          If I were you, I would delete the Human MENU table. Then, I would create global fields in my "Menu" table for searching like this:




          On the menu page, I would allow users to type into those global fields.


          I would make a "Search" button that had a script that looks like this:

          Set Error Capture [ on ]

          Set Variable [ $freezingdate ; global_FreezingDate ]

          Set Variable [ $patientid ; global_PatientID ]

          Enter Find Mode [ no pause ]

          Go To Layout [ Humans ]

          Set Field [ Humans::FreezingDate ; $freezingdate ]

          Set Field [ Humans::PatientID ; "==" & $patientid ]

          Perform Find

          If [ Get(LastError) = 401 ]

             Go To Layout [ original layout ]

             Show Custom Dialog [ "Error" ; "No records that match were found" ]

          End If

          With that button, I do not need a relationship at all between Menu and Humans, I take the values from Menu, go to Humans, and search for matches. If no matches are found, it returns and shows a message to the user.


          This is some basic scripting, and there are other ways to do it. I would highly recommend watching some training videos as they will help you grow quickly!


          You can put many global fields into your Menu table, and perform the same searches for all of your other tables. And you would never need to setup a relationship at all to any other table.


          Good luck!