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.

Calculating total quantity based on status in related table

Featured Replies

  • Newbies

Hi,

I am an FMP Novice, I'm struggling with what should be a fairly simple calculation.

I have a master table (Inventory) containing a list of chemicals and a related table (Item) listing each container of each chemical (uniquely identified by a serial number), the quantity in each container and the status of the container (i.e Stock, In use or empty). I want to be able to record on my master table the total volume of each chemical we have.

I have been trying to perform the following calculation in the stock volume field;

if(Product Name = Item::Item and Item::Status ≠ "Empty";Sum(Item::Container Volume))

The result i get is a total calculation including the empties - which i don't want included.

I'm sure it's something obvious that i am missing, but i can't seem to see what it is. I hope someone can help.

Thanks

Pinki

First of all, there is no native conditional "sumif" function and you cannot write calculations the way you are attempting to write them. There are some custom functions that can do this.

However, in your case, there does not appear to be any need. If the container is empty; then it's empty! So all you need is Sum(Item::Container Volume). But I may be making the assumption that you're recording the actual stored volume in addition to the container capacity; and maybe you're not doing that. That is, you might have a 5 gallon container that is holding 2 gallons.

So another approach would be to have a calculated volume field, case( status="empty"; 0; capacity) and use sum( Item::CalculatedVolume )

Edited by Guest

  • Author
  • Newbies

Hi Thank you - this worked a treat.

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.