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 do I calculate a total for all records?

Featured Replies

  • Newbies

Hello,

I'm new to Filemaker, and I'm trying to get a total calculation of every record. Let me explain.

In my Layout, I have a "Paid" field. Positive numbers will be black, and negative numbers, red. Below the "Paid" field, I have a "Total" field. What I'd like to do is create a "New" record for every new job I receive, and input the amount paid, but I'd like the "Total" whether positive or negative amount to show in the "Total" field, in every record.

Is this possible? How do I calculate this?

Have I confused everyone grin.gif

Any help would be appreciated.

Thanks

Dean

I will get slower and slower when number of records will increase in time.

It involves calculation across many records and that is not best practice.

Better will be to store the Total amount by script into another file after you post new transaction. Then you can display that static stored Total amount on every record with help of simple relation "many to one".

  • Author
  • Newbies

I've very new to FM. Is there an easier way to do this?

Thanks

Try this summary field: Total of (Paid).

You may want to check the running option too. That's what I chose for an accounting solution I once developped and is still in use with 3,000+ records without any kind of slowlyness.

I figure that for huge dbs (and/or poor hardware and OS) you should consider Anatoli's method.

  • Author
  • Newbies

Logixx,

That did it. Thank you

Dean

Yes, that will be OK for smaller number of records. It is also dependable on usage, OS, speed of HW etc. I am talking about 100k+ record situations...

In network situation it is having other unnecessary effects, like clogging network and slowing down everything...

I have a similar situation (I think) same advice for me?

I'm redesigning a db of 50,000 records to keep track of art slides. I have related tables -for example one for artist (name, birth date, death date...) Within this table, I thought it would be nice to be able to see how many slides we have for each artist in the main file so I made a simple calculation field just using the count function. Once I import all my files- will this calculation slow things down?

Thanks much

RE: Once I import all my files- will this calculation slow things down?

Not drastically on today's hardware.

Obviously -- transaction system will be always faster -- instant.

It is simple:

Artist has 20 slides

when you receive next 5 slides, you will add this to the total (20) with script so now the static value will be 25.

This way you can have million records without any delay.

Sounds good.

Thanks much!

I'd like to add, that if you use a transaction system for 'mission critical' calculations, you should also write a 'check' script, that you can run at certain intervals to test the integrity of the stored results.

Ernst.

  • Newbies

Logibox - thanks very much I've been trying for weeks to find a solution to this problem - you've craked it for me !

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.