Photo by Dan-Cristian Pădureț on Unsplash | How To Coda your stock?

How To Coda your stock?

Christiaan Huizer
3 min readFeb 18, 2022

--

Keeping track of your inventory in 4 steps.

Hoe have list of components used in your products and you sell a product, this has an impact on your component inventory. Below how this works.

Below the tables we generated and which show the basic principles of any inventory management system you would like to set up in Coda

The table sales tells how many of each products got sold. The volume is a text field and can be filled-out manually or via a button or even an automation.

The Bill Of Materials (BOM) shows per products the components and we link these components to the stock we have.

The calculation

We follow a few not too difficult steps, starting with relating the volume of products sold to the components, thus the BOM table. It is simple filter and in case the sales does not cover all products (like our product 3 in this example) we go with a zero via IfBlank(). To turn it into a negative number we simply multiply by -1. It is an easy and often applied trick to make your summation work.

The second step is to link the the volume with the parts to understand how many of the parts we have to take out of our stock. Easier than this you won’t get it.

showing the total amount of parts to take away.

The third step is to relate this volume to the actual stock. Again a filter comes into play. Notice that I use ‘thisRow’ and not ‘thisRow.Name’. This is because the lookup in the BOM table is based on ‘thisRow’.

bringing in the volume.

The last but one step is to alter the volume. For this we use a button and inside the button the function ModifyRows(). It goes as you see below.

The final step is that we push one button that pushes all the buttons in the stock table. This is a RunActions(Stock.Button) .

modifying your stock

And off you go. It is done. And of course, in case you hit the button again it happens again. To make the proces smooth and error proof you can polish this logic and for example empty the volume in the sales part.

I hope you enjoyed this article. If you have questions feel free to reach out. Though this article is for free, my work (including advice) won’t be, but there is always room for a chat to see what can be done. Besides you find my (for free) contributions to the Coda Community and on Twitter

My name is Christiaan Huizer and I am the owner of Huizer Automation. A company specialized in serving SME in harvesting data and keeping it aligned. I am a Coda Consultant & Expert and rely mainly on Coda, Mailjet, Zapier & Paperform to get the job done.

Huizer Automation — Coda Expert and Consultant on “How To Coda your stock?”

--

--

Christiaan Huizer

I write about how to Coda . You find blogs for beginners and experienced makers. I publish about 1 / week. Welcome!