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 to get a total of just one field

Featured Replies

I have the following tables and fields.

[Orders]

OrderID

ShippingTotal

TaxTotal

[OrdersCharges]

ChargeID

Amount

OrderID

Type (can be Tax or Shipping)

For EACH order, how can I show the total tax and then the total shipping from the [OrdersCharges] table within the [Orders] table?

Each record in the [OrdersCharges] table can have MANY ordercharges. I tried creating a global text field called and TAX and populating it with "TAX". Then I did a self join where Type = Tax. Obviously they matched but this didn't work.

Thank you in advance.

Edited by Guest

Why do you have an OrderCharges table if it's a one to one relationship? Just put tax rate, TaxTotal, ShippingTotal in Orders.

  • Author

Thank you, I have corrected the oversight in my explanation. It is actually a one to many relationship.

There are several ways to approach this, but with only two types perhaps this may suitable:

1. Define an unstored calculation field cTaxType (result is Text) in the Orders table = "Tax".

2. Define a relationship between Orders and a new occurrence of OrderCharges (let's name this TO "TaxCharges") as:

Orders::OrderID = TaxCharges::OrderID

AND

Orders::cTaxType = TaxCharges::Type

3. Define a calculation field cTotalTax (result is Number) in the Orders table =

Sum ( TaxCharges::Amount )

Repeat these steps for the Shipping type.

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.