10 Replies Latest reply on Mar 8, 2011 3:16 PM by Sketter

    Count records with marked fields



      Count records with marked fields


      So I'm trying to add a Total Survey field to a table layout footer that will tally up all the records that have the Survey check box marked in a certain found group.


      I've tried to use the Get(FoundCount) but for some reason that doesn't seem to even display a number of any found records.


      Any help?



        • 1. Re: Count records with marked fields

          Get ( FoundCount ) must be part of an Unstored calculation and then it will just show the total number of records in your current found set.


          You can set up a summary field with the Count of option to count records that aren't empty for both grand and sub-totals.


          If you need to count records with specific value, you can define a calculation field that is blank unless the other field has this value and then set your summary field to count the calculation field.


          Example: CheckBox field has the value list: Red, Blue, Green and you want to count the records where "Green" was checked.


          Set up cGreen as: FilterValues ( CheckBox Field ; "Green" )

          Setup sGreenCount as a summary field with the "count of" cGreen.

          • 2. Re: Count records with marked fields

            That works great thanks!


            But I think I'm about to face a more advanced problem.

            While thinking ahead, I'm going to have to organize this by which properties, and  departments have done surveys, and would like to calculate the survey count per department, and a grant total, all in the footer.



            So to break this down, I have two fields when to comes to a contacts work environment.  Work_property and Work_department.

            So it would be nice if it could ideally display Total count per property (grand total(what you already given me I guess)), total per department(groups within the property).

            And if passable a viscera for those that haven't done a survey. 

            • 3. Re: Count records with marked fields

              You might want to search this forum for threads on surveys for useful discussions on how to structure a database for surveys.


              I can't really answer your last post as I have no idea how you've set up your tables and fields for this.

              • 4. Re: Count records with marked fields

                I did a search and I gather you might be thinking that I'm making the survey itself.

                If you are that isn't the case, it's not the survey itself, just a count to see who has done it that's marked in the database.


                While what I needed help with you answered,(thank you!) I was just thinking down the road, cause while everyone will be required to do one at one point, they just work in different areas at the office. So my idea was just to total by department, and by total all, in one table view.


                (The table view had the department names, that's why I through those in there in case that helped.)


                Thank for your help though.

                • 5. Re: Count records with marked fields



                  Any time you want totals by a group such as your totals by department, a summary report becomes a possible method for reporting such sub totals.

                  Here's a link to a simple tutorial on setting up summary reports that you may find useful:

                  Creating Filemaker Pro summary reports--Tutorial

                  • 6. Re: Count records with marked fields

                    Your tutorial ended up helping a lot. It did exactly what I wanted Thanks for the link!


                    But now I want to add a percent to it all.


                    My Sub-summary report in the Leading part, is sorted by Department, with the department field and next to that is a Count total field that gives me a count of people who have done the petition.  Next to that I would like a field that gives me a percent of those that have done the petition, as well as add a percent in the Trailing Grand Summary.



                    • 7. Re: Count records with marked fields

                      You can use a "fraction of total of" summary field for this.

                      • 8. Re: Count records with marked fields

                        I tried to read up on "Fraction of Total of" on the forums as well on FM help, and i couldn't quite figure out how to use it.  I'll keep looking.

                        When I'm faced with the options of what fields to use there are tons that are blanked out and the only ones that seem to be available look like calculation fields and unrelated. 

                        • 9. Re: Count records with marked fields

                          You may need to create a field that always has the value 1.


                          such as a calculation field where you just enter the number 1 as its "calculation"


                          Then you can do a fraction of total of this field, place it in your sub summary part and format it as a percent.

                          • 10. Re: Count records with marked fields

                            Ok, so i finally have come to the part where the last part is now needed.

                            So when trying to implement what you said, by having the calculation value of 1 and then using fraction on that value. It gaves me a percent, but a percent of how many in the group based on overall total.

                            Trying to find something that will give me a percent of how many has done the petition within the group.

                            So if i have a pool of 50, then 4 are in a group and only 1 did the petition, then i would need something to calculate that into 25% and show it in the sub summary part.