We are using Airtable to organise our plant nursery. We need it to track the stock of plants in the nursery and match to orders etc. Its a bit different to normal stock tracking where we might track "current stock" by adding to stock when we get in stock and subtracting as orders go out because we have to grow the plants from seed and there are often plants dying, not being good quality etc. So we often have to go out and count the actual plants in good condition on the tables to get an accurate idea of stock count. But we also want to be able to subtract from the stock count automatically as stock is sent out. So we have a conflict between what we want to enter as our current stock levels - if we have a calculation in the current stock field - auto subtracting deliveries - we can't simply type in a number when we do a manual stock count. Any suggestions on how to resolve this ?
Stock tracking
Best answer by TheTimeSavingCo
This is doable but gets pretty weird so bear with me!
As you've mentioned, you count your plants to get a stock count, and so maybe you start off with 100, and then the next day you do another count and find 15 dead, so now you have 85 plants left
After that, you send out 3 of said plant, and you want the number "82" to be calculated for you from your base
The idea is to have a "Movement" table where you log stock count updates as well as sending stuff out, and you'll just select the type of update as you create the record like so:

Resulting in this:

To get to this point, we use a rollup field with the formula `MAX(values)` to find the most recent "Count Update" record linked to Plant 1. Once we've done that, we can then pull the correct stock count number over to our main base via a conditional lookup
After that, we use another rollup field to get a sum of all of the "Out" records linked to Plant 1, and deduct it from the correct stock count number
Like I said, it gets...pretty weird. Here's a link to the base so that you can see exactly how everything's set up, and you can duplicate it to view the formulas and such
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
