5 Replies Latest reply on Aug 26, 2013 6:27 PM by RobertRichmond

    Limit results based on 5 records or more



      Limit results based on 5 records or more



           I have a page which displays the related records for students who have not completed their homework. On one side I have an item # (shown in the image below). 

           This field is a summary field which essentially counts the "RecordNumberToBeUsedByTotalNumberOfRecordsField" field and displays that as a number. This works very well.

           What I now need to do is to filter the results so it only displays those records where iTem count is 5 or more. That is, if the item count is 1,2,3 or 4 it doesn't display that record at all.

           It seems that you cannot filter based on a summary field, so I am wondering how I might limit the results displayed so it only shows those items which have 5 or more records?




        • 1. Re: Limit results based on 5 records or more

               Enter find mode, set your summaryofrunningRecordnumber to > 4, perform find.

          • 2. Re: Limit results based on 5 records or more

                 Since criteria cannot be entered into a field of type summary, you'll need to use a different approach.

                 I would search on a related student table, where you have one record for each student. I'd define a field of type calculation in that field that returns the same subtotal as this summary field and specify my search criteria in it.

            • 3. Re: Limit results based on 5 records or more

                   Hi Chamblee,

                   Yes. I tried that first and came up with the issuse raised by Phil.


                   I could create a calculation filed in the Student table but the problem is that the reports are done on a date range (which corresponds to a term normally), so the staff can view the records based on that term. This means that the value would change constantly depending upon the report requested.

                   So what i need to do is: Filter the results I need between for the term selected -> Which is simple enough. Then with these results search for any results where the student ID is listed 5 or more times.

                   So perhaps I am looking at this the wrong way? Perhaps I should be collecting the items I need first and then creating the report instead of trying to limit the report itself.....

                   Is there a way within a found set, to omit records where the student ID for example, is listed 4 or less times? Then when it creates the report, that is all the data it has to work with...... This would work...

              • 4. Re: Limit results based on 5 records or more

                     You can use that date range as part of the relationship that matches records to get the counts that you need.

                     Relationships that match on a range of values can be implemented in one of two ways:

                     Use inequality operators

                     Students::STudentID = HomeworkSupport|DateRange::StudentID AND
                     Students::DateStart > HomeworkSupport|DateRange::Date AND
                     Students::DateEnd < HomeworkSupport|DateRange::Date

                     Use a list:

                     Students::STudentID = HomeworkSupport|DateRange::StudentID AND
                     Students::DateList = HomeworkSupport|DateRange::Date

                     DateList would be a text field or a calculation field that returns text and stores each day's date from date start to date end separated by returns.

                     DateStart, DateEnd can be fields with global storage specified so that you can specify the same date range for all your students a single time.

                • 5. Re: Limit results based on 5 records or more

                       Well I am going to try using a temporary table (as I call them anyway). I'll copy the data into a table with a unique ID so I can call the data up and then display it as required, and while I am entering the data, I will create a record number against each unique student and a total Number, which I can then limit the results to. 

                       Then once I'm finished with the data, I will delete it. Sounds like the long way around I know, but it's at my present level and I think I can do this.