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.

Summing Donation totals in a portal for FM7

Featured Replies

Hey Everybody, hopefully I'm not repeating a post b/c I looked around but I'm trying to figure out exactly how to use a script to find the sum of some displayed figures... Basically our database is set up for donators of which you can view the history of each particular person or company via a portal with the pertinent information.

Basically, I want to write a script for a calculation field found underneath the portal that takes the Amount field from each donation instance in the portal and sums them up and places the grand total in the calculation field "Total". Every script I have tried just adds the values in a horizontal fashion but we need it to go down the list and add those values... any ideas???

Here's an example of what the portal looks like FYI:

--------------------------------------------------------------

Donation Type: Cash Amount: 50.00 Date: 03/29/02

Donation Type: Check Amount: 490.00 Date: 05/28/04

--------------------------------------------------------------

(end of portal)

Grand Total: 540.00 <-- But I cant get this to sum right...Thanks in advance!

FileMaker Version: 7

Platform: Windows XP

A script isn't necessary, this can be done with a calculation field.

In the file that has the portal, and assuming the portal is using a relationship named "PortalRelationship ": define a calculation field and set it to: Sum(PortalRelationship::Amount)

Place the calculation field on the layout outside of the portal & Voila!

Does this do what you need?

  • Author

I have tried placing the Grand Total field outside the portal (called "Donations") and Grand Total field is defined as a calculation set to:

Sum(Donations::Amount)

It will only display the value in the first Amount field.

Using Example from above it would only display "$50" , not "$490" or "$540"

UPDATE:

I have figured out to do this with a script using the "Insert Calculated Result [Donations::Total; Sum(Donations::Amount)]"

Though I still don't understand why the above method you suggested isn't working.

Can you upload your file so I can look at it? I'm not sure what's going on, it may be a FM7 issue I haven't encountered yet in my limited usage.

I'm still using FM6 and am having a similar problem (see my post), but if it's the same, what I've been doing is creating a new TRIALING GRAND SUMMARY part and putting the Summary field inside a portal in this new part. Works MOST of the time...

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.