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 of sub-summaries

Featured Replies

I have a report that is broken into sub-summaries.

I wish to be able to count how many different summaries there are. How do I achieve this.

I tried using count(fieldname) (fieldname = the field that the summary is sorted by) but it always returned 1.

See if this helps:

http://fmforums.com/forum/topic/61158-number-of-employees-from-payroll-report/page__st__-20#entry289204

  • Author

I'll give it a shot, thank you.

I am not entirely sure what the getSummary function does, can you please explain? I read up on it but it doesn't make too much sense to me.

GetSummary() retrieves the sub-summary value of a summary field. It's the same value you see when you place the summary field in a sub-summary by breakfield part.

  • Author

Thanks.

This seems to work in the layout, when I have the final count in the sub-summary by which I want to count. However, when I assign it to a variable in a script, it always returns 1.

How can I work around this?

  • Author

got it!

  • Author

got it!

actually, appears not. i thought it was working, but then changed my script and now it's not giving the right value, but am finding it the same way as before.

i have it enter preview mode, grab the value from the field, and then return to browse mode. this works for a different field, but not this one. strange.

It's not necessary to enter Preview mode. However, records must be sorted.

BTW, If you only want to populate a variable, you could have let the script do the count and eliminate the extra fields.

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.