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.

Quick!! Portal Found Count???

Featured Replies

In FM 8.5, I can't figure out how to show the number of portal records found. I just want a count of the related records!

Create a calc field with Count (related_field)

Daniel

Stuff Count from the aggregate functions into a calc'field, not to be confused with the Summary function. But you need to count on the foreign ID in case empty fields otherwise might exists. ValueCount(List( the same field will produce similar results ...but the important issue here is that the calc'field needs to be unstored - perhaps is the new option faster?:)

--sd

  • Author

Thanks, guys!

I ended up creating a calc field in the related table that = 1, then SUM that field.

(That was before I got any replies!)

Works like a charm!

I ended up creating a calc field in the related table that = 1, then SUM that field.

I'd recommend you switch to dharlow's solution. count() is more efficient than sum() for this, and doesn't require a separate calc to count in the child table.

Indeed it seems pretty weird to bloat a solution with redundance, may we hear some kind of defence for this disposition???

--sd

  • Author

Agreed, guys!

My defense is found in the first word . . . "Quick!"

You see, I was at a customer, and could not figure out how to do it - so after searching FM help, this forum and coming up empty, I posted, hoping for a quick response - I figured it was such a simple thing that anyone perusing this portal forum would know it and drop me a hint!

I know, a high expectation to get an answer so soon after posting, but worth a try!

As you can see, the first response was 10 hours later - I was sleeping then, 50 miles away from the database! So, that is my only defense for the slopy, inefficient, redundancy, and I will use dharlow's "Create a calc field with Count (related_field)" when I get in front of that database again.

If only that answer came 9 hours earlier :)-)) !!

Thanks for your concern, everyone!

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.