Greg Hains Posted June 2, 2018 Share Posted June 2, 2018 Good evening. Could somebody please help me with this? Attached is a sample solution whereby I have two tables (Client and Activity) which are linked by a single field (Client_ID). I am trying to count the records in the second table (Activity) whose Programme (field) is "OR", "CC" or "C2" - as per the layout in the Client table. The solution attached is not complete, but I am unsure how to setup the relationship so that I can count these records. Currently I am only showing the total record count in Activity. Any suggestions would be appreciated. Thanks, Greg Sample.fmp12 Link to comment Share on other sites More sharing options...
OlgerDiekstra Posted June 2, 2018 Share Posted June 2, 2018 You could use summary fields. They can get slow with large datasets so thats something to watch out for. See sample file. Sample.fmp12 Link to comment Share on other sites More sharing options...
Greg Hains Posted June 2, 2018 Author Share Posted June 2, 2018 Good evening Olger Thank you for your help on this - much appreciated. I was trying to get it one step further though by counting the instances of fields in Activity with contents of the Programme field - so the result on the Client page would be: Client ID 2 OR Records found 1 CC Records found 0 C2 Records found 4 That's what I couldn't get working correctly. Any ideas how I can narrow it down in the Activity table please? Greg Link to comment Share on other sites More sharing options...
OlgerDiekstra Posted June 2, 2018 Share Posted June 2, 2018 Oh dang it. I had that the first time round. Then I started playing and tried using relationships but that didn't work because you used Get( FoundCount) for the recordcount. Then I looked again and thought, I don't need those calcs, I can just do the summaries. And never looked at the results again. 😛 Sample.fmp12 1 Link to comment Share on other sites More sharing options...
Greg Hains Posted June 2, 2018 Author Share Posted June 2, 2018 Perfect! Thank you very much Olger - that's what I was looking to achieve. Cheers, Greg Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 2146 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 accountSign in
Already have an account? Sign in here.
Sign In Now