Jump to content
Sign in to follow this  

count of ALL related records, not just those in portal

Recommended Posts

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.


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.

Share this post

Link to post
Share on other sites

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?


Share this post

Link to post
Share on other sites

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.


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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