Skip 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.

Sum repetitions from Child

Featured Replies

The attached file is Edoshin’s crosstab demo that I have modified to suit my needs as follows: I have added a Parent table (Category) with 2 fields: Category Name, Amount (Calc Repeat field with 12 reps) and linked it to Expenses by category

I set Amount = to Sum( ) of Expenses::Month field (which is a repeat field) with the hope that repet1 in parent would store the total of repet1 in child, repet2 in parent store the total of repet2 in child etc....

The results are telling me that I am doing something wrong. Could someone please take a look a the file an tell me how to store in each repetition in parent the sum of the equivalent repetition number from child.

SumRepeat.ZIP

  • Author

I tried using Get(CalcRepNbr)with GetRepetition() and Sum() with no result.

Any suggestions/hints/comments ?

You need to use summary fields to get that behavior, and choose "sum repetitions individually" for the summary.

I'm not quite getting why you choose to show it over a relation why not make a found set before making the cross-tab. However if you are shouldn't Sum(expenses... be used, but instead grap the Expense::)∑Totals without any aggregate function, and you get the summaries shown ... but it's still not obvious why you would need to use relations here.

--sd

  • Author

Thanks The Shadow, the summary field did the trick.

I never thought of using a summary field because I read that the proper way to add child records is to use the Sum () function.

Is referencing a summary field from the Parent perspective a reliable way to aggregate child records ?

And by extention would it be equality OK to use a summary field in formula in parent in place of Sum(of child records)?

Thanks again

  • Author

Hello Soren:

Because there are other pieces of info (from parent) that I want to show on the layout and also I do not need a printed report. I prefer a list View from the parent side.

As mentioned in my reply to Shadow I did not know that one could use a summary field from the parent side. I always though that the rule was to use Sum().

Is referencing a summary field from the Parent perspective a reliable way to aggregate child records ?

Yes, this is supported and reliable. Related summary fields operate over all related records.

And by extention would it be equality OK to use a summary field in formula in parent in place of Sum(of child records)?

Yes, but one issue is that FileMaker automatically caches summaries, and they are sometimes left stale if the field is not shown in a report (preview mode is fine). This isn't an issue unless you are changing values and need the sum to immediately adjust - then you need to use Sum() instead.

Also, be aware to use a summary field in a calculation you need to use the GetSummary() function in most cases, otherwise it will return the grand-total (I think).

  • Author

Thanks The Shadow; greatly appreciated

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

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.