1 Reply Latest reply on Mar 23, 2011 12:25 PM by philmodjunk

    Count records with current field letter



      Count records with current field letter


      Hello reader,

      I am a new user of filemaker. Or non profit organisation asked me to make a little database program to administer the kids that come to or party.

      So i made a database and has de fields "Name" "Adress" and "Groupchar". (and some more information)

      We want to make groups of 10 kids. This group has a group character.

      So 10 kids in group "A", 10 kids in group "B" and so on....

      Now i want to make the field Groupchar so it will count how many kids already have a character.
      So when there is a character is entered the character is counted till 10 max and give a message that there are already 10 kids with the character.

      I have searched the forum but nothing works for me. Can some one please help me.


        • 1. Re: Count records with current field letter

          This seems to be the day for self join relationships. This irequest is very similar to: How can I count the values but there the poster wants to count records from the same month.

          I'm going to call your table "Children".

          1. Open manage | Database | Relationships.
          2. Click the box labeled "Children" to select it
          3. Click the button on bottom left with two green plus signs on it to make second "table occurrence" of this table. You haven't created a new table, just a "box" on this window that also refers to Children.
          4. Drag from the GroupChar field in one table occurrence box to the GroupChar field in the other. This will give you this relationship:

            Children::GroupChar = Children 2::GroupChar

          5. Now click the Fields tab and create a calculation field with this calculation: Count ( Children 2::GroupChar)
          6. Place this calculation on your layout and you'll see the count for all children records with the same group character as your current record.


          You can also click the Fields tab in Manage | Database and double click GroupChar where you can use Count ( Children 2::GroupChar) in a validation calculation that will pop up an error when the count exceeds 10:

          Count ( Children 2::GroupChar) < 11

          If you'd like to learn more about table occurrences and how they control the function of FileMaker databases: 

          Tutorial: What are Table Occurrences?