3 Replies Latest reply on Sep 18, 2012 10:33 AM by philmodjunk

    Constrain not constraining ???



      Constrain not constraining ???


           I have a layout in which I can submit a beginning and ending date.  (in global date fields).  I then FIND/Constrain the visible records according to that date range.  Simple enough.  Right? 

           In the layout below, I first perform a find for "Members" and "Active.  Then I Constrain that found set.

           Well, I am missing something....  For some reason the Constrain does NOT limit the dates to >= 2012 and <= 2012.

           Can you see what I am missing?



        • 1. Re: Constrain not constraining ???

               While I prefer to use set field to specify search criteria rather than burying them inside the various find script steps (makes it easier to review when you open the script in the script editor), what you have for a script looks correct.

               What data type is Dues_MembershipYr?

               Is it a Number field or a calculation field with Number selected as the return type?

               If Text is specified, change it to Number as you need a Number data type in order for this to work.

          • 2. Re: Constrain not constraining ???

                 Thanks for the reply.

                 I am not quite sure 'why',  but changing the layout focus from Members (the one) to Dues (the many) did the trick.  The summary fields don't work properly but I think if I change their location to Members and base them on a calculated fields pointing to the Dues field it will work. 


            • 3. Re: Constrain not constraining ???

                   When you perform a find and specify criteria in a field from a table related to the layout's table, Filemaker will find all records in the layout's table so long as at least one related record contains the specified criteria.