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.

Determine number of subsummary occurences

Featured Replies

Is there a way to programmatically determine the number of subsummary occurences in list view/browse mode.

I have a function that calculates the minimum height of a window (based simply on the layout size and the foundcount). I would like to include subsummaries on this window now in FM10, but I cannot do so without knowing how this will affect the window height.

If there’s an easy way to determine the number of times the subsummary will occur given the foundset, then I should be able to factor that into the window height function.

Sub-summaries only appear once per unique value in whichever field the found set is sorted by.

So you could create a script that does something like this:


go to record (first)

loop

   if fieldYouAreSortingBy ≠ $lastFieldContents

      set variable $summaryOccurrences to $summaryOccurrences + 1

   end if

   set variable $lastFieldContents to fieldYouAreSortingBy

   go to record (next, exit after last)

end loop

show custom dialog $summaryOccurrences

Then use $summaryOccurrences in your window height calculation.

Hope that helps.

James

It can be calculated - see:

http://fmforums.com/forum/showpost.php?post/297916/

If you prefer a scripted count, I suggest you study the Fast Summaries technique by Mikhail Edoshin:

http://www.kevinfrank.com/demo-files-78.html

http://edoshin.skeletonkey.com/2006/12/crosstab_report.html

  • Author

thanks to you both!

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.