# Inventory - Restocking (right formula)

**URL:** https://community.glideapps.com/t/inventory-restocking-right-formula/41788
**Category:** Ask for Help
**Created:** [May 9, 2022, 6:04pm UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788 "2022-05-09T18:04:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Chichap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chichap/32/42361_2.png) [@Chichap](https://community.glideapps.com/u/Chichap)
#### Post date: [May 9, 2022, 6:04pm UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/1 "2022-05-09T18:04:55Z")

</div>

Hi Glide community,

I need some advise and guide on the restocking of certain inventory. Im running into wrong computation or flow.

Available stock - Use stock = New stock value  
New stock value + Restock

Now when I use the same formula the computation is wrong. as it will still make use the Use stock in the new calculation. I was thinking I need to let the new restock value to be the new Available stock for the next calculation.

Any guidance is appreciated.

---

<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: [May 9, 2022, 11:39pm UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/2 "2022-05-09T23:39:54Z")

</div>

I’m not sure I fully understand your question. Do you mean the final result you get is wrong? Do you mean the “live” stock for the goods is wrong?

The “live” stock value should equal:

Stock you input at the start - Used stock + Restock.

I assume you’re storing used stock and restock in either columns in the same table, or more ideally, rollups from other tables (to store transactions for Using stocks and Restocking stocks).

---

<div class="post-metadata">

### Author: ![Tuttografica](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tuttografica/32/16484_2.png) [@Tuttografica](https://community.glideapps.com/u/Tuttografica)
#### Post date: [May 10, 2022, 12:32am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/3 "2022-05-10T00:32:37Z")

</div>

Hello, I don’t know if it works for you. There goes my grain of sand.  
I use a column with an increment action.  
I always use the same stock column. if I add the sum, if I remove the rest and I always have the updated stock. I don’t know if it’s your case.  
Greetings

---

<div class="post-metadata">

### Author: ![Yasin\_Hassanien](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yasin_hassanien/32/9042_2.png) [@Yasin\_Hassanien](https://community.glideapps.com/u/Yasin_Hassanien)
#### Post date: [May 10, 2022, 7:01am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/4 "2022-05-10T07:01:07Z")

</div>

You should have a stock log table that acts as a balance sheet connected by a parent id and the children should have the stock added as -ve or positive

+1  
-1  
+1  
-2

And so on and then you can rollup by the these values it will get you a total stock on hands

If you arendoing production then there is something called available stock thatbeill require another table so you can balance on hand vs available allocation

---

<div class="post-metadata">

### Author: ![Chichap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chichap/32/42361_2.png) [@Chichap](https://community.glideapps.com/u/Chichap)
#### Post date: [May 10, 2022, 7:22am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/5 "2022-05-10T07:22:03Z")

</div>

thanks guys, abit occupied at the moment will give it a try all your suggestion.  
I feel Im missing something basic.

the column initial stock, use stock and restock are all in same table.

appreciate much! 😉

---

<div class="post-metadata">

### Author: ![Yasin\_Hassanien](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yasin_hassanien/32/9042_2.png) [@Yasin\_Hassanien](https://community.glideapps.com/u/Yasin_Hassanien)
#### Post date: [May 10, 2022, 7:42am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/6 "2022-05-10T07:42:05Z")

</div>

Wrong to have it in the same column the calculation might mess up

---

<div class="post-metadata">

### Author: ![Chichap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chichap/32/42361_2.png) [@Chichap](https://community.glideapps.com/u/Chichap)
#### Post date: [May 10, 2022, 8:39am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/7 "2022-05-10T08:39:36Z")

</div>

I figured it out with you all guys help, i just did same logic on how I roll up all the outstack , applies to instock and use the basic math calculation.

what works for my case, I roll up (sum) the outstock, rollup (restock) and do the math result.

Thanks!  
Cheers!

---

<div class="post-metadata">

### Author: ![Hani\_Ibrahim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hani_ibrahim/32/42108_2.png) [@Hani\_Ibrahim](https://community.glideapps.com/u/Hani_Ibrahim)
#### Post date: [May 10, 2022, 9:45am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/8 "2022-05-10T09:45:11Z")

</div>

You can find an Inventory template at your dashboard. It is great. You can see how it is built and re implement

---

<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: [May 11, 2022, 9:45am UTC](https://community.glideapps.com/t/inventory-restocking-right-formula/41788/9 "2022-05-11T09:45:53Z")

</div>

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