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.

Getting information from one table for a calculation by a record in another table

Featured Replies

  • Newbies

Hi,

I am new to filemaker and am using it to do pricing analysis on prototype products we make. I have two tables: one has a record for each product we are developing showing the amount of materials in each product. The other table has a record for each material giving the price and other specifics. I want a way to have the product table look up records in the materials table and return the price or other information about the material.

For example, record for product A might have 5 different materials: base material, primer, paint, trim, etc. I want the record for product A to be able to access and look up the price (for example) of "paint" from the materials list and use it to do a calculation that would show how much product A would cost.

Ideally, the price of "paint" is changed then the product record would update to show this.

What is the best way to do this, scripting? I am, unfortunately, quite new to scripting also.

Thanks for any help you can give.

There should be 3 tables. Product, Materials, ProductMaterials which is a join table. Each product consists of many materials which can be added or subtracted from it. However, each materials is its own seperate component.

  • Author
  • Newbies

Thanks for your reply. I am not sure I understand the ProductMaterial join table. Can you explain?

thanks

Well a Product is a product. A material is a material. However, a product is made up of many materials.

Therefore, you should have another table that stores the ID numbers of each of those materials items for each product.


ProductID     MaterialID

1             45

1             22

1             9

2             1

2             59

So lets say product 1 is a bed. Material 45 is a mattresss, 22 a frame, and 9 the boxspring. Product 2 is a dresser set. Material 1 is the dresser and material 59 is the mirror. Do you follow? So if you have prices stored within the Material table specific to that item you can do two things. Either you can store the cost at the time that the material was added for the material (historical or point in time) with a lookup, or you can always price it will the latest amount by summing up the amounts from the material table.

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.