3 Replies Latest reply on Jan 11, 2013 10:25 AM by philmodjunk

    advice for creating a searchable contact list layout

      Title

      advice for creating a searchable contact list layout

      Post

           Hi there,

           I'm new to FileMaker and my company has tasked me to create a searchable contact list for staff to use.

           Basically staff need to be able to search for contacts based on two different fields, then go to that contact detail layout.

           I know I will need two layouts (one for searching, and the other for contact details).

           What im stuck on is the search page.  Both search fields come from a fixed range of values, so both will be dropdown lists.

           Staff need to be able to choose the a filter from both dropdown lists, then the filtered contact summary should appear below the list.  Then the staff member can click on one of the contact summaries to take them to the contact details page.

           How do I do this?  I think I need to do an AND found set but not sure how to acheive this in a layout.  Sorry this is such a noob question but any advice would be greatly appreciated.  smiley

        • 1. Re: advice for creating a searchable contact list layout
          philmodjunk

               First check out this thread for examples of scripted finds. Note how fields with global storage are used in these examples: Scripted Find Examples

               In FileMaker finds, any criteria specified in the same find request is an "and" type find. If you specify "red" in a field named "color" and "25" in a field named Quantity, then perform the find, you find all records with "red" in the color field and 25 in the quantity field. In your case, a scripted "and" type find need simply have two set field steps, one to specify criteria for the first field and one to specify criteria for the second.

               An OR type find finding all records that have red in the color field OR 25 in the quantity field takes more scripting to put each criterion in a separate request or to perform successive finds with Constrain Extend found set used in place of Perform Find after the first Find is performed.

               To get the layout that you describe, you can set up a list view layout and put your two global, formatted fields in the header. You can use script triggers on these fields or a button in the header to perform the find.

               In the body of this list, you'll see the records found by the scripted find and you can either place a button in the layout body or select all fields in the layout body and use button setup to turn them into a button. Either such button need only use Go to Layout to go to a different layout set up for a detailed form view of a record from the same table to enable the user to select a record pulled up by the find to see it on the detail view layout.

               You can even add script steps that count the number of records found and that then switches automatically to the detail view if only one record is found.

          • 2. Re: advice for creating a searchable contact list layout

                 Thanks Phil thats really appreciated :)

            • 3. Re: advice for creating a searchable contact list layout
              philmodjunk

                   Note: spotted pretty serious error in my previous post and edited it to correct it.