5 Replies Latest reply on Mar 3, 2014 2:28 PM by philmodjunk

    Filtering records in Table view



      Filtering records in Table view


           Hi to everyone!

           Im quite new in FileMaker, awesome soft.

           I have a list view that shows records from "Purchases" table, each one with its details and picture that`ll be used to make a custom product. Each Order (or Purchase) has its own status coming from a value list I created, showing values from a table called STATUS.  Id like to filter these orders by status. Basically Id like to pull from a value list placed on the header whichever status Id like to filter all records so if i want to see only Orders with status "in process" or "delivered" i just need to choose from this value list.
           And it would be really handy also having a new layout only showing records from same "Purchases" table with status "delivered".

           Thanks a lot.


        • 1. Re: Filtering records in Table view

               Please note that a "list" view and a "table" view are two different options for viewing a layout. (You've used the terms interchangeably here.) I recommend list view over table view for most tabular style views of your data.

               If the drop down field in your header is given global storage in field options in Manage | database, you can use a script similar to those found here: Scripted Find Examples You can use a script trigger such as onObjectModify or OnObjectSave selected for the drop down field to perform this find script.

          • 2. Re: Filtering records in Table view

            PhilModJunk  ,

                 thanks for your reply. You`r right, i meant List View all the time. Thought I tried to understand the post you linked, and tried several times to make it work, there is something clearly Im not doing right.

                 See, I have a layout called "Order Details" based on (showing records from) "OrderDetail" table. This table has a field called "fk_status" related to the table "Status" which has records (Ordered, shipped, printed, finished, bla bla). This records from the status table are the ones I would like to use to filter the records on the layout Order Details. 

                 Each record (order) has a status, entered manually by a drop down list that shows values from the table "Status".

                 I told you I wanted to place a drop down value list on the header of the layout so that whenever I modify (OnObjectModify) the filtering script runs, showing only records with that specific status i chose. 

                 Maybe you could help me by a for dummies step by step ?

                 Thanks Again!

            • 3. Re: Filtering records in Table view

                   Did you define a text field with global storage to place in the header and format with your value list?

              • 4. Re: Filtering records in Table view

                     Yep. Done.

                • 5. Re: Filtering records in Table view

                       Then the scripted find examples give you examples of the script steps you would use to script this. From a drop down list that permits entering data directly in the field, you'd use the OnObjectSave trigger to perform this find script. From a popup menu, you can use OnObjectModify.

                       If you have created a script following those examples, post a copy of it here and I'll take a look at it.

                       To post a script to the forum:

                  1.           You can upload a screen shot of your script by using the Upload an Image controls located just below Post A New Answer.
                  3.           You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
                  5.           If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                  7.           If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.