1 Reply Latest reply on Feb 9, 2015 5:28 AM by philmodjunk

    Gender Count Question



      Gender Count Question


      Thanks in advance for any suggestions.


      I have a client database with many tables but I am dealing with one client_Table.


      I have a script that finds client birthdays for each month of the year. In this script I use the Get(FoundCount) function to give the total birthdays for the month. I would love it if I could also count the number of males/females as well. Is there a filemaker function to accomplish this? I tried a loop inside of a script trigger after performing the find for those with birthdays in that month, but I could never manage to move my record from the first record found to the next. I was using Go to Record/Request/Page [Next; Exit after Last]


      Is there a different way?

      Thanks again.


        • 1. Re: Gender Count Question

          What you describe attempting to do with your script should work but there are more efficient ways to do that.

          If you sort your client records first by the month of their birthday and then by their gender, you can set up a layout based on the client function where you have removed the body layout part and added two sub summary layout parts. The first would have a "when sorted by Month" setting. (You may have to add a field that returns the Month number if you don't have one already) and the second would be "When Sorted by Gender". If you put a summary field that is a "count of" summary field to count your records inside this second sub summary layout part, you will be able to sort by Birthday month and by Gender to get your counts for each month broken down by Gender.