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.

How to get calculation field to calculate ALL portal rows, not just first portal row

Featured Replies

Hey guys,

 

I am working on a brewing recipe file and I have created a IBU calculator. I have the calculation working but it needs to be based on all of the portal rows. Currently it only reads from the first portal row and will not make any further adjustments to the calculation for additional rows. I don't know if I am missing something in my calculation or what.

This is the formula for the IBU field, and it is basing the findings from a portal called "Hop Database Copy"

Brewing Recipes = ( Hop Database Copy::Quantity * ( Hop Database Copy::Alpha Acids * 100 ) * Hop Database Copy::Percent ) / 7.25

Thank you for your help,

 

Alex

Brewing Copy.fmp12

20 minutes ago, Agian510 said:

it needs to be based on all of the portal rows

What exactly does 'based on" mean? Should it sum up all the individual portal row results? Or maybe average them? Or ... ?

  • Author

Thank you for your response.

Each portal row is it's own calculation but then I would like it to sum up each portal rows results. This should get the desired outcome that I am seeking.

The simple method is to split the calculation into two fields: one defined in the child table that calculates a result for each portal record.  The other, defined in the parent table, does simply Sum ( ChildTable::Calcfield ). Or you could define a summary field in the child table to do essentially same thing - total the calculation field.

It is also possible to do this in a single calculation field in the parent table that loops over the child records and accumulates the individual results. However, you would need the Advanced version in order to construct a custom recursive function. Or version 18 or higher in order to use the While() function.

--
P.S. All those parentheses are redundant.

 

Edited by comment

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.