2 Replies Latest reply on Aug 12, 2014 10:39 AM by yianyue

    Filter/Search records based on 1 field



      Filter/Search records based on 1 field


            I have searched for on the forum and found queries and responses that seemed to have been able to help those in a similar circumstances. I must apologise for my ignorance with Filemaker, I am very new to Filemaker and unfortunately have had this project thrust unto me by the powers that be, along with a deadline, so I haven't had the time to really get to grips with the functions or scripting. So if you are able to help, please can you dumb it down to the most basic level.

           I currently have 1 table with the following fields

           - ID

           - Meter Serial number

           - Meter Location 

           - Current Read

           - Previous Read

           - Advance


           The ID is the Primary Key, The meter serial no is a unique number to the meter, and the Meter location is one of 9 areas in a factory. I would like (if possible) to have the Meter Location field as a "search" or "filter", so the client selects one area, from a dropdown box or similar, then only the records that have meters in that "area" would be displayed. So the client selects "Area 6" and only the records from area 6 are displayed. If you could help I will be most grateful!


           Thanks again. ( as i said I am very new to this so please play nice).

        • 1. Re: Filter/Search records based on 1 field

               1.  Create a new text field gSearch, set storage to global and place on layout.  Under the inspector select Dropdown List.

               2. For Values From:  click the pencil and make a new value list.  Call it Meter Location Search.  Under Edit Value List, select "Use Values from Field" and for the field select your Meter Location.

               3. Create a new script with the following script steps:

                    a) Enter Find Mode (uncheck pause-no parameters)

                    b) Set Field [YourTableName::Meter Location; gSearch]

                    c) Perform Find [] (no parameters)

               4. Attach a script trigger to the gSearch field.  Select OnObjectModify.  Select the new script. 

               That should do it.

               Edit:  fixed script


          • 2. Re: Filter/Search records based on 1 field

                 I would also add that you should have a look at the starter solutions.

                 When I started with Filemaker, I was in a similar boat as you, with the added bonus of having no experience with any database software. Looking at the starter solutions really helped me, showing me what can be done with filemaker and how to do it.