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.
How do I create a form to populate the WIP tables?
How do I reduce the stock in Raw mat once used in WIP automatically as added in WIP?
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.