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.

Best Practices for Grand Total field

Featured Replies

forgive me if this question has been answered elsewhere. I'll try to be brief:

I have a table "events", and another table "line items".

Users are complaining that event invoices are slow. There are many potential areas that I could look at for speeding it up, but right now I'm looking at the grand total.

 

Historically I have used this calculation field in line items table:

 
Total of Total Cost +
If(
Line Items to Events to Payment Types:: d.c. Tax Exempt ≠ "yes"; 
Total of Food Bev Tax Amount+
Total of Misc Tax Amount+
Total of Parking Tax Amount
)
 
however, I recently learned about the sum () aggregate function, so I was wondering if creating this calculation field in events table would make any speed difference:
 
Sum(Events to Line Items::Total Cost) +
If(
Events to Payment Types:: d.c. Tax Exempt ≠ "yes";
Sum(Events to Line Items::Food Bev Tax Amount) +
Sum(Events to Line Items::Goods Tax Amount) +
Sum(Events to Line Items::Parking Tax Amount) 
)
 
 
From a speed perspective, is one preferable? I suspect the latter, as it eliminates the need for the "Total of..." summary fields. Thanks in advance.

If you're talking not about real summary fields for an arbitrary found set, but rather about static totals for Events parent records, then from a speed perspective it makes more sense to create and store these results in real time, i.e. each time you add/delete/edit the relevant fields/parameters, update the results field(s) via script.

 

In essence, this means trading one huge performance hit when displaying records against many small performance penalties while working with the parent and/or child records. The advantage is that the display is much faster, since instead of (par force) unstored calc fields that have to be re-calculated continuously, you're displaying stored fields.

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.