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.

Find and sub Total Script

Featured Replies

Have built a database of clients. For the sake of the exercise the DBase has 2 fields. A name field and an amount field.

There are about 6 records for each name and my task is to write a script that firstly finds and groups all the records with matching names,

then adds up the amounts in the corresponding amount fields for each client, placing them into a new sub total field.

Finally I want to sort high to low based on the sub total field.

The result is that whilst we receive various amounts from clients (single records) throughout the year, I will be able to group and get a complete total for each client, then see who pays us the most over the year.

Can someone help please?

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

quote:

Originally posted by Roger1:

Have built a database of clients. For the sake of the exercise the DBase has 2 fields. A name field and an amount field.

There are about 6 records for each name and my task is to write a script that firstly finds and groups all the records with matching names,

then adds up the amounts in the corresponding amount fields for each client, placing them into a new sub total field.

Finally I want to sort high to low based on the sub total field.

The result is that whilst we receive various amounts from clients (single records) throughout the year, I will be able to group and get a complete total for each client, then see who pays us the most over the year.

This is a pretty standard summary report.

For simplicty sake create a summary field which totals the amount. Then create a layout and add a sub-summary part by client. Place the client and amount fields in the body, place the summary field in the sub-summary part.

Sort the records by client and go to Preview mode. You will now see the summary part, totalling the amount field by each client.

Now you can go crazy and add lots of other niceities.

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

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

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.