I have been trying for dozens of hours to create more advanced inventory management app.
Simple overview:
Tables:
Products - List of products that are ready for sale.
Parts - database of all parts for products assembly.
Recipe - Separate recipe table for each product.
Idea is to produce a product and calculate used parts with one click to subtract used parts. Currently the calculations happen in “recipe” table and an automation task takes the remaining quantity and sends the new quantity back to “Parts” table.
I am using methods from this tutorial: https://www.youtube.com/watch?v=IKqm5OzyLZQ&list=PLMf2Af_xkzRVzEFysCaNTWZMDy9xpbHyf&index=3
Maybe my approach is totally wrong. Should i make an action instead?
I tried an action which made the calculation but then I had to run the action per every product. For 10 products i had to run the action 10 times.
1 Like
It would be more helpful to write down what you’ve done instead of watching a 1-hour video.
I have tables “release stock” and “add stock” with a form view where i enter the product and quantity to add/release.
“release stock” table columns:
product name - it’s a “valid if” field, the product name is referenced from “products” table.
Item code - referenced from “products” table according to which “product name” i choose.
quantity - where i enter how many products i have sold/released.
quantity available products - the value is referenced from “products” table.
remaining products - formula: [quantity available products] - [quantity].
Next step is my automation task with this formula:
“Item code”: “<<Any(Select(Release stock[Item code],[_thisrow].[Item code]=[Item code]))>>”,
“Remaining products”: “<<Any(Select(release stock[remaining products],[ID]=MAXROW(“release stock”,”_Rownumber")))>>"
It take the result of the “remaining products” and take it back to the “products” table.
Now i am trying to create similar function but instead of changing the quantity of one product i need to change the quantity of many products.
For that i have a tables “parts” and “product recipe”.
“Parts” is a database with all parts in the inventory .
“Product recipe” contains a list of parts needed to build one product.
Im struggling to create a function that subtracts the quantites given in “product recipe” from the database “parts” table.
I tried to use the same method as with the “release stock” function.