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.

Get count of related records with specific field value

Featured Replies

  • Newbies

Hello,

Here is my scenario. I have two tables. One with dog houses, each record has information about the doghouse, etc. Second I have a table with each individual dog, each dog is linked to a doghouse by a housing ID. Each dog also has a status of "Active" or "Otherwise." What I want is each doghouse to have a count of how many "Active" dogs are linked to it. I can then do searches and calculations based on that.

Is there a way to have a doghouse record value that is a calculation, or will I need to write up a script that is run every time I want a report. 

As a side note I have some 6,000 doghouses and close to 60,000 dogs registered. The faster it works the better.

 

Thanks in advance!

You can have a calculation field in the DogHouses table =

ValueCount ( FilterValues ( List ( Dogs::Status ) ; "Active" ) )

However, such calculation will be unstored, so if you plan to "do searches and calculations based on that", you might be unhappy with the speed. If this is for a report, it might be preferable to turn this task over to the script that produces the report.

 

Create an account or sign in to comment

Important Information

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

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.