# Increase inventory when PO is approved

**URL:** <https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886>\
**Category:** Ask for Help\
**Created:** [February 16, 2024, 2:28pm UTC](https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886 "2024-02-16T14:28:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [February 16, 2024, 2:28pm UTC](https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886/1 "2024-02-16T14:28:38Z")

</div>

I have an inventory table (products, quantity, LastPurchasePrice)

I then have a PurchaseOrder table where I create new purchase orders, and a third table which contains the actual line items linked back to the PurchaseOrder.

Purchase order is created, line items added and then it needs to be approved.

At approval, I want to update the inventory and increase the quantity field by the approved PO and also update the lastPurchase price in the inventory table.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 16, 2024, 2:35pm UTC](https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886/2 "2024-02-16T14:35:07Z")

</div>

So you would need to adjust the values in multiple rows of the Inventory table?

Right now, the only practical way to do that is via the Glide API.

---

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [February 16, 2024, 2:40pm UTC](https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886/3 "2024-02-16T14:40:33Z")

</div>

Yes.

So call a webhook and pass it the data so it can then make the API call to do the update ?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 16, 2024, 2:54pm UTC](https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886/4 "2024-02-16T14:54:48Z")

</div>

Yes. Glide just released a new JSON Template column that makes that pretty easy.

Have a look at the below, will give you the general idea…

> [@Using Call API and Glide API to add rows to related tables. Also...JSON Object!](https://community.glideapps.com/t/using-call-api-and-glide-api-to-add-rows-to-related-tables-also-json-object/70860):
>
> I wanted to show how you can use our new JSON columns to allow you use Call API into the Glide API. This allows you to create multiple rows in a different table and related them to the main table. Marco created a great [video](https://www.youtube.com/watch?v=b7_k3_brusQ&t=6s) showing how this was done with an older method (before we had all the great new JSON columns) that used a combination of template fields but you can do this all with just a JSON Object column now. Here is a [Loom video](https://www.loom.com/share/041b3cf99dec42c1a4d25af8c7aee38f) to explain. If I missed explaining anything feel free…

---

<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:** [February 23, 2024, 2:55pm UTC](https://community.glideapps.com/t/increase-inventory-when-po-is-approved/70886/5 "2024-02-23T14:55:08Z")

</div>

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