# Linking raw materials to blend in WIP form

**URL:** <https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556>\
**Category:** Ask for Help\
**Created:** [June 8, 2023, 12:58am UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556 "2023-06-08T00:58:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![as1said](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/as1said/32/60137_2.png) [@as1said](https://community.glideapps.com/u/as1said)\
**Post date:** [June 8, 2023, 12:58am UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556/1 "2023-06-08T00:58:09Z")

</div>

Hi,

I’m new to using Glide. Please point me in the right discussion if there’s already an answer for this.

I have 2 tables in Glide Table, raw materials (Name, Category, Stock in kg) and WIP - Work in Progress (Unique ID, Blend Components from Raw Mats, Weight in kg)

The blend components are a few raw materials being put together depending on their recipes.

1. How do I create a form to populate the WIP tables?
2. How do I reduce the stock in Raw mat once used in WIP automatically as added in WIP?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 8, 2023, 11:39pm UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556/2 "2023-06-08T23:39:37Z")

</div>

Would a WIP contain multiple components from raw mats? I assume you would also restock raw mats at some point?

---

<div class="post-metadata">

**Author:** ![as1said](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/as1said/32/60137_2.png) [@as1said](https://community.glideapps.com/u/as1said)\
**Post date:** [June 9, 2023, 2:27am UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556/3 "2023-06-09T02:27:49Z")

</div>

yes. it would contain multiple raw materials.

and yes, I would restock the raw materials at some point.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 9, 2023, 11:46pm UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556/4 "2023-06-09T23:46:02Z")

</div>

What I would do is create an extra table where you store the “components” of the WIP.

- Have a form to populate a “parent” WIP row, this can include the WIP name and notes about it.
- In the WIP details screen, add a form to populate the “components” of the WIP in the extra table. This would include the WIP’s rowID, the raw material’s rowID and the weight.
- In the WIP table, create a multi relation using its rowID to the extra table, then use a rollup to calculate the total weight.
- In the raw materials table, create a multi relation using its rowID to the extra table, then use a rollup to calculate the total weight used.
- Use a math column to deduct the amount used from the “stock” amount to get a live stock.
- Maybe use an increment action to increase the original stock column if you don’t need a historical log, or add a table to store the historical log of “restocks”, with the raw material ID, the timestamp and the added amount, then use another combo of relation + rollup to get the total amount added. The math column in the above step should now have the formula being: original stock + total added - total used.

---

<div class="post-metadata">

**Author:** ![as1said](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/as1said/32/60137_2.png) [@as1said](https://community.glideapps.com/u/as1said)\
**Post date:** [June 10, 2023, 10:56pm UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556/5 "2023-06-10T22:56:54Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 11, 2023, 10:57pm UTC](https://community.glideapps.com/t/linking-raw-materials-to-blend-in-wip-form/62556/6 "2023-06-11T22:57:33Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
