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.

Count Related Records Conditionally

Featured Replies

I have a Personnel table and a Timesheet table, related by a Personnel UID (unique ID field). (One Personnel record to many Timesheet records.)

The Timesheet table includes a field "Approval Status" that can have 4 possible values based on a value list (New, Submitted, Approved, Needs Revision).

I'm trying to find the cleanest way to show how many related Timesheet records have a status of "Submitted" on each Personnel record.

The ultimate goal will be a "dashboard" for managers (based on Personnel table) with a portal of their direct reports (self-related table PersonnelSelf_DirectReports based on a manager field) that displays how many records each direct report currently has waiting for approval. (The Timesheet record is currently "Submitted" and needs the manager to review and change to "Approved".)

I'll also want to give employees a dashboard portal showing that they have Timesheet records that the manager marked as "Needs Revision", but once I figure out the above, this will logically function the same.

I tried a calculation field in Personnel with a Count function of related records, but I can only then do a straight count, not a count with a condition (aka count only where Approval Status = "Submitted".

Any suggestions would be appreciated.

18 minutes ago, Courtney said:

how many related Timesheet records have a status of "Submitted"

Try =

ValueCount ( FilterValues ( List ( Timesheet::ApprovalStatus ) ; "Submitted" ) )

 

  • Author

Thank you! Perfect!

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.