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.

Using Portals & Relationships to Determine Inventory Value

Featured Replies

  • Newbies

I am trying to come up with a set of calculations to give me the inventory value of our raw materials, based on the most recent purchases.

I have 2 tables here, Purchases Line Items and Supply Inventory. Supply Inventory contains the fields Item_Name, Quantity_Remaining, and what will hopefully be a calculation for value of our remaining supplies. Purchases Line Items contains the fields Item_Name, Quantity_Purchased, Purchase_Date, Item_Price. The tables are related by Item_Name, sorted by Purchase_Date, because I want my inventory value calculation to assume that our remaining inventory items are the ones we purchased most recently (i.e. FIFO).

So for example, I have a record in Supply Inventory that lists SupplyA and 10 units remaining. On the Purchases Line Items table, I have several records that show my purchases of SupplyA: 2 units purchased on 10/10/2012 at $10, 7 units purchased on 9/10/2012 at $12, and 5 units purchased on 8/10/2012 at $8. Therefore, I want my calculation to show that the value of my 10 remaining units is $112 (2*10+7*12+8*1)

I simply cannot figure out how to make this work via a portal, calculation, or otherwise. Any help would be much appreciated. I am using FMP 11 Advanced.

Ouch. This is not going to be easy. You need a recursive process - either a script or a custom function - to go over the related purchases, until you reach the remaining amount. Lot of work and a plenty of room for error. Are you sure you need this?

  • Author
  • Newbies

Thanks. I figured we would need something like that, but I'm not sure it's worth the work. Appreciate the reply.

  • 1 month later...

Has anybody given you a solution to this yet??

 

If not, let me know.

 

I had to do the same thing and I can help you with this.

 

It is pretty simple.

 

Thanks.

 

Tom

 

 

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.