# How to Prevent Inventory Stock from Going Negative

**URL:** https://community.glideapps.com/t/how-to-prevent-inventory-stock-from-going-negative/80962
**Category:** Ask for Help
**Created:** [March 25, 2025, 10:41pm UTC](https://community.glideapps.com/t/how-to-prevent-inventory-stock-from-going-negative/80962 "2025-03-25T22:41:38Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [March 26, 2025, 12:14am UTC](https://community.glideapps.com/t/how-to-prevent-inventory-stock-from-going-negative/80962/2 "2025-03-26T00:14:54Z")

</div>

You are trying to lookup the “max value” in a form, that won’t happen naturally due to the sandbox nature of the form.

You have 2 ways to go here:

- First method: For the Product ID choice, create a column in your users table for it, and write to that column instead of the Product ID in your Work Orders table. Then, add a special value in your form to write User Profiles \> Product ID to the Work Orders.

This allows you to access the Product ID value whilst still inside the form. From that value, you can create a relation & lookup to retrieve the max value allowed for the quantity.

- Second method: Create a custom form.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particular…

---

_[View the full topic](https://community.glideapps.com/t/how-to-prevent-inventory-stock-from-going-negative/80962)._
