3 Replies Latest reply on Jan 6, 2011 8:34 AM by philmodjunk

    Count records

    RitteT

      Title

      Count records

      Post

      I want to add a field where it calculates the count of records based on a specific field.

      Let's say that I have 1000 records.

      And in 3 of the records, the value in one of the field is "Yellow" so I want a field that display 3 based on the count of records that match "yellow" in that specific field.

      I also want to add one more criteria, the "created date".

      I've looked at count-function, but the seems only to count within the record. (I always get value "1").

      I did some reading and I suspect that I've to use relations. 

      I'm not very good in using relations, so I may need some help here.

      Thanks!

      Last edit: Solved everything.

        • 1. Re: Count records
          RitteT

          Solved it with:

          http://help.filemaker.com/app/answers/detail/a_id/3465/related/1

          Edit, I follwed the above link. 

          Instead of Count(MyFileMatch::TextField), found under point 3 next to MatchingRecords I wrote (MyFileMatch::Date).

          Date=Created date.

          It gives me correct count, but since I added the "Date field" today, I only have today as created in the latest records. The rest is empty.

          So I can't decide until tomorrow if the function works.

          Can you see based on the function if it will work? 

          • 2. Re: Count records
            RitteT

            I able to count matching email in all records, but I want to filter the count based on creation date.

            Advice?

            • 3. Re: Count records
              philmodjunk

              You can include more than one pair of fields in your relationship. Use one pair to match email addresses, add a second pair to match by creation date. You can drag from email field to email field then drag from date field to date field to add both pairs of fields or you can double click the relationship line and add the additional pairs of fields there.