4 Replies Latest reply on Aug 2, 2013 9:51 AM by philmodjunk

    Checkbox Search / Find

    FileMakerNovice

      Title

      Checkbox Search / Find

      Post

           Hey all,

           Been wracking my brains on this one and picking through the discussions but couldn't find an answer.  I'm trying to figure out how FileMaker (12) deals with check boxes for searches.  Let me explain my dilemna:

           I have a table called Calls.  It is a list of employee id, date and type of call that they took.  Types of calls could be sales, technical, how to, etc.  So, employee #1:  1, 7/30/2013, Sales would be an example of a record.

           I would ultimately like to do a search for date range and have a check box for TypeofCalls.  There would also be some calculated metrics but I think I can get some summary fields without a problem.  BUT "Type of Calls" field labels can be variable.  There could be Sales1, Sales2, SalesA, SalesZebra.  So I would like to have a find that populates these through a checkbox.  I have done this by creating a value list.

           My major problem is how do I use the check mark set to perform a find.  I have attempted to use a parent table, a global field and a calculated value that uses List() but to no avail.  Should I be creating a script to separate the checked items?

        • 1. Re: Checkbox Search / Find
          philmodjunk

               I'm not sure how you set up your checkboxes. There are three options to evaluate:

                 
          1.           One checkbox formatted field with all the values listed for this one field.
          2.      
          3.           Indivdidual fields with just one check box value for each field.
          4.      
          5.           A set of (usually related) records with one checkbox value for each record.

               All can look very much the same though #3 also enables you to include a scroll bar that isn't possible with 1 and 2.

               But each will require a different approach for performing a find.

               And then you have to decide whether the criteria you specify with your check box is for an "and" search or an "or" search.

               Find all records where value 1 is selected or value 2 is selected?

               FInd all records where value 1 and value 2 are both selected?

               A scripted example of a find that uses a single field checkbox with global storage specified to perform an OR search may be found in the follow on posts in this thread: Scripted Find Examples

          • 2. Re: Checkbox Search / Find
            FileMakerNovice

                 Thanks Phil,

                 I'm reading http://fmlayoutmode.com/wp/?p=2500 now.  Seems to be related to what I am looking to do.  I'll take a look at your tutorial/forum post after that.  

                 The answer to which I am using, I've tried the three options you mentioned.  I need a dynamic list so the #2 was a no go.  I'm leaning towards #3 because of the scroll option, just in case the list is too long to populate the alotted space that I give it.  The search is going to be an "or" search/find.  

                 To the drawing boards I go.  Thanks for the link.

            • 3. Re: Checkbox Search / Find
              FileMakerNovice

                   Awesome Phil!  Your way seems to be the best route.  Relating to your tutorial post, what field type does Globals::gFruitlist have to be?

              • 4. Re: Checkbox Search / Find
                philmodjunk

                     To quote my previous post: "a single field checkbox with global storage specified". In otherwords, it's your standard single field with multiple values checkbox field, but with global storage specified so that it's values remain accessible to the script when the script enters find mode. If you don't use global storage for this field, you have to set a variable to this field's value before entering find mode and then you refer to the variable in place of the global field. Using global storage saves you a step and keeps other users on a hosted database from seeing the choices made in the checkboxes.