Skip 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 of ALL related records, not just those in portal

Featured Replies

I have a series of related databases: Trips, Parties, Clients. A trip contains parties, which contains clients. From the perspective of Trips I want the number of total clients in that trip.

I have two portals set up in my layout. One shows the parties related to a trip. When I click on a button in a portal row of the parties db, then the clients in that party are displayed in a second portal.

When I click on a button in the portal row of the clients db, then additional detail about that client is displayed in fields next to the portal.

This all swell and is working perfectly.

But...

I have a calculated field in the Trips db that counts the clients in the related clients db. However this is only showing the count of related records in my portal, but I need a record that holds the total of all related child records regardless of whether the are contained in a portal or found set.

This is probably stupid simple, any help appreciated.

Since the count() function returns a result of all records whether or not they appear in a portal I can only presume that if there are more related records then you have in your portal then there must be 2 relationships - 1 for the portal, and 1 for all the related records.

If that is the case then when you formulate your Count() calc use the relationship that relates to all the records and not just those within the portal.

Or am I missing something?

Phil

  • Author

I thought that count() would return all related records whether in the portal or no but that's not what was happening.

When I clicked on a button in the Parties portal row it set the value of a global field to the value of that Party record ID.

Then only the client records that matched that ID were displayed in the second portal via a relationship with set up with that global field.

In any case I solved the issue by setting up some new table instances and created the needed chain of relationships down to the client table. The first chain was being filtered by the table row button but the second relationship chain was unfiltered and so always reported the correct number of clients in the party.

There may be another way to do this but this options works fine.

Thanks for the input.

GF

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.