Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Counting fields in related table

Featured Replies

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

You could use summary fields. They can  get slow with large datasets so thats something to watch out for. See sample file.

Sample.fmp12

  • Author

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

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

  • Author

Perfect!

Thank you very much Olger - that's what I was looking to achieve.

Cheers,
Greg

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.