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.

Conditionnal calculated fields with related fields

Featured Replies

Is it possible to calculate with a condition on a relate field?

Lets says table B is a product table which has a category field, a price field and a foreign key to a record in table A. The category can be X, Y, Z. Each product has a pr

Table A is let say a bill table (I know that's not the way it should be, it's only an example).

Is it possible in table A to create a sum field of the price all the products which belong to category Z?

In SQL, it would look like

SELECT Sum(tableB.Price)

FROM tableA INNER JOIN tableB ON tableA.pk = tableB.fk

WHERE tableB.categoryID = 'Z'

If you create a global text field and then create a new relationship to another table occurence of TableB, you can join on tableA::pk = table::fk AND tableA::gCategoryID = tableB::categoryID.

Now all you have to do is set the gCategoryID global field with "Z", "Y", whatever and you can now get the total.

If this is not for browse mode and you want to just display it in a report, then you can use a summary report which has been contrained to "Z"

  • Author

That solution seems good.

I'm not very aware of all the "not too" relational db trick in Filemaker.

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.