How to Decrement a Number Field in an Airtable Record Using a Checkbox

You have a record in Airtable that contains a number field. This field represents stock, and the value must decrease by one when a checkbox is checked.

value must decrease by one when a checkbox is checked

At first, it seems straightforward. You think you can create an automation, set the trigger to when a checkbox is checked, and then add an Update record action. In that action, you would set the stock field to stock minus one and move on.

However, once you actually try this, you realize it is not possible.

Airtable automations do not allow calculations inside the update step. You cannot subtract one directly from a field there. You can only take values that already exist in fields and copy them into other fields.

So the problem becomes how do you decrement a number field using a checkbox.

Decrement a Number Field

To solve this, you start by creating a formula field in your table. You can name this field something like Stock minus 1.

In the formula, you reference your original number field and subtract one from it. If your original field is called Stock, the formula is simply {Stock} - 1. This formula field always shows what the stock value would be after decrementing it by one.

Next, add a Checkbox field to the same table. This checkbox is what the user will tick when they want to reduce the stock value.

Fields in table

Now create an automation. Set the trigger to When a record matches conditions. The condition should be that the checkbox field is checked. This ensures the automation only runs when the checkbox is turned on.

For the action, choose Update record. Configure it to update the same record that triggered the automation. Set the Stock field to the value from the Stock minus 1 formula field. You are not typing a number here. You are inserting the value from the formula field.

In the very same Update record action, also set the checkbox field back to unchecked. This resets the checkbox immediately after the automation runs, making it ready to be used again the next time you want to decrement the stock.

Automation

What is happening here is subtle but important. The automation is not doing any math. All calculations live inside the formula field. The automation simply copies the calculated value into the stock field and then resets the checkbox.

Each time the checkbox is checked, the number field goes down by one, without scripts, without extensions, and without complicated logic.