Jump to content

Simple count of records depending on field data


Teks4u

This topic is 2380 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have 19 different organizations with each one having different blood pressure readings. 

Have figured out how to get the name and  number of records found as well as the total number of records in database using both Get(FoundCount) and Get(TotalRecordCount) when I do a search. 

I can get it to do the first organization and give me the correct data as I can see it matches the found set.

What I will it take for me to get it to do this in a report form similar to this:

Organization                               Number of Participants                                      Total Number of Records in the System

ABC Org                                                     3                                                                                 250

ZTE Org                                                     75

Blink Org                                                   34 

Red Org                                                     6

 

Should I create a script that loops through and searches for each organizations name and then repeat the search and if so then how would I get it to write the number of participants and total number of records found for the new organization before continuing and finally finishing and stopping?

Edited by Teks4u
Link to comment
Share on other sites

It appears you're looking to do a simple sub-summary report.  If you are not familiar with sub summary reports, searching this sight or googling something like 'FileMaker subsummary reports' will provide you with plenty of resources.

  • Thanks 1
Link to comment
Share on other sites

  • Newbies

Lee, 

Using this site:http://help.filemaker.com/app/answers/detail/a_id/6198/~/simple-example-of-a-su  has helped solve most of the problem.

What is occurring now is that I'm getting duplicates from the total amount of records in the system into the field that should display individual amount of data for that church. I used the  Get(TotalRecordCount)  which for the total records in the system and used  Get(TotalRecordCount) for the individual church. 

I created a script as such:

Show All Records

Sort Records [No dialog]

Go to Layout ["Participants Count"]

Sort Records by Field [Ascending;BP Count::Created By]

 

Everything is working correctly but the individual counts is off. Any idea of what I should be doing to make that right? 

Screen Shot 2017-10-17 at 1.47.44 PM.png

Link to comment
Share on other sites

  • Newbies

Good afternoon Lee and Steve, 

Have changed the programming up a little, think I'm getting closer to getting it working. The numbers are appearing but not sure what these numbers are as they are not correct, but think I'm getting closer to making it work correctly. 

Screen Shot 2017-10-17 at 2.12.50 PM.png

Link to comment
Share on other sites

Can you attach a sample with some records and/or show the same layout in layout mode.

I think for the record count you want to create a new summary field and make it equal Count of and use your primary key.  Put that field in your sub summary part and total part.  But I'm just guessing.

Link to comment
Share on other sites

  • Newbies
18 minutes ago, Steve Martino said:

Can you attach a sample with some records and/or show the same layout in layout mode.

I think for the record count you want to create a new summary field and make it equal Count of and use your primary key.  Put that field in your sub summary part and total part.  But I'm just guessing.

Have done the summary field technique that Lee told me about. 

Followed this example

http://help.filemaker.com/app/answers/detail/a_id/6198/~/simple-example-of-a-su 

So far it's all working correctly save for the Number of Participants is coming out strange.

I'm not permitted to send the file as it's part of a churches data and for HIPPA compliancy that would cause me major issues. I feel I'm close to solving it, just need a little help figuring out where I'm going wrong on the counting. I know that if I set it up in the body of layout and do a simple search everything works correctly. It's just when I do it in summary report things break. 

The second image shows the working version in it's layout within a body.

The first image shows the summary report layout in layout mode, using the method from the link above. 

Screen Shot 2017-10-17 at 3.31.20 PM.png

Screen Shot 2017-10-17 at 3.39.58 PM.png

Better copy of layout mode

Screen Shot 2017-10-17 at 3.44.57 PM.png

Got it working finally. I'll write out what I did later tonight so that the next individual who wants to do it can follow the steps and make it happen. 

Thank both Lee and Steve for the help and pointing me in the right direction. I do appreciate both of you. 

Link to comment
Share on other sites

This topic is 2380 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.