Ask most small businesses what's actually in stock right now, and the honest answer is usually "let me go check." Someone counts the shelf, cross-references a spreadsheet that was last updated three days ago, and hopes nothing sold in between. Stock counts that live in a spreadsheet are only ever as accurate as the last time someone remembered to update them.
In this tutorial, we'll build an Inventory Stock Monitor — a system where each product's stock level updates itself automatically every time a sale or restock happens. Open the table, and the number you see is the number that's actually true right now.
Start with a table called Product. Add the fields Name, SKU (Text), and Unit Price (Currency, USD).
Product table with Name, SKU, and Unit Price columns
Add a few products to work with:
Product table showing three records for Wireless Mouse, Mechanical Keyboard, and USB-C Hub with their prices
We'll add the stock level once we have real sales and restocks to calculate it from.
Create a new table called Sale. Add a One-to-Many field linking each sale to a Product, a Quantity field (Number), and a Date field.
Sale table with Product link, Quantity, and Date columns
Add a few sample sales:
Sale table listing three sale records for Wireless Mouse and Mechanical Keyboard with quantities sold
Create another table called Restock, also linked to Product via a One-to-Many field. Add a Quantity field (Number) and a Date field.
Restock table with Product link, Quantity, and Date columns
Add a sample restock:
Restock table showing initial stock records for all three products
Now go back to the Product table. Add a new column and set its data type to Custom Logic — this needs to be chosen from the start, since a plain column can't be converted into one later.
Adding a new column on the Product table and selecting Custom Logic as the data type
Describe the rule: for each product, take the sum of all linked Restock quantities and subtract the sum of all linked Sale quantities, to get the current Stock Level.
Describing the stock level logic as total restocked quantity minus total sold quantity
Confirm the clarification screen once the system shows its interpretation, then click Save.
Clarification screen confirming the aggregation logic across Sale and Restock tables to compute Stock Level
Product table showing the Stock Level column filled in automatically for all three products
Let's test it. Add a new sale: USB-C Hub — Quantity 4 — 2026-08-23.
Adding a new sale record for USB-C Hub with a quantity of four units
Go back to the Product table. USB-C Hub's Stock Level has already dropped from 15 to 11 — no refresh, no manual recalculation.
Product table showing USB-C Hub's Stock Level updated instantly after the new sale was recorded
Now add a restock: Mechanical Keyboard — Quantity 15 — 2026-08-24.
Adding a new restock record for Mechanical Keyboard with a quantity of fifteen units
Mechanical Keyboard's Stock Level jumps from 8 to 23 immediately, reflecting the restock without any extra step.
Product table showing Mechanical Keyboard's Stock Level increased after the restock was recorded
What you built:
This same pattern — a running total derived from linked activity — works well beyond inventory too. Think available seats after bookings and cancellations, remaining budget after expenses, or available leave days after requests are approved.
Coba Langsung
Halaman ini
Artikel terkait
Jelajahi lebih banyak artikel produk dan praktik terbaik untuk tim yang membangun dengan Ambisius.
Masih Pakai Spreadsheet?
Wajib Coba Ini.
Ubah spreadsheet yang biasa digunakan menjadi sistem terstruktur yang dibangun untuk bisnis Anda
Tanpa komitmen. Tanpa kartu kredit.

© 2026 Ambisius. Seluruh hak cipta dilindungi.