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.

Alternative method to summary field

Featured Replies

I need to get the total amount of the invoice but when i add summary field it slows down the database. i have alternative but it sometimes slow 

here is the script.

 

Performfind

SetVariable $total::Value:0

Loop

Go to first record

SetVariable $total::value::$total+amount

Go to next record

End Loop

 

Assuming that you have a relationship between the invoice and its invoice items then you can set the invoice total fields to the sum() of the invoice items.

Don't make that a calculation field but use the scripted approach to set the field.

 

As an aside: if you need to loop through records to pick up data, you can do that without actually going to the record: look into the GetNthRecord() function.

IMHO, nothing is faster than a summary field. If you are experiencing performance issues (most likely as a result of displaying too many summary or unstored calculation values at once) and want to move to a scripted method, then take the summary field off your layout/s, but keep it in the table/s. Then set a number field directly to the summary (or sub-summary, as the case may be) value.

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.