# Counting how many times a box has been checked (no scripting required!)

Topic Labels: Automations Formulas
1010 0
cancel
Showing results for
Did you mean:
8 - Airtable Astronomer

Hi all

Here's a little workaround I came up with to easily track how many times a checkbox has been ticked using just an automation and a formula:

https://youtu.be/3C36OoWb3MQ

It always annoyed me the "last modified" field will update whenever a field is edited, and not only when a field matches certain conditions. This means you can't use it to monitor when a box was last checked, only when it was last *checked or unchecked*. I got around this by making a "tally" of how many times the box has been checked or unchecked by adding one character to a string each time this happens, using an automation. Then I use the LEN() function to calculate the length of this string, and divide it by 2. Because Airtable always rounds up decimals when you set the format of a field to integer, this means whenever a box has been checked an odd number of times (e.g. 3) this will round up the half length of the string to 2 (i.e. 1.5), but when it's been checked an even number of times, there'll be no rounding up to do (i.e. 4.0 = 4). This means that the first action (checking the box_ gives you an output of 1, the second action (unchecking the box) keeps the output at 1 (half of 2 = 1), and the third action (checking the box again) gives you an output of 2, and so on.

The "last modified" field will update every time a field is edited - but what if you only want to log whenever a field is edited in a certain way? Here's how to use a checkbox with an automation to keep a running total of how many times the box has been ticked. Formula used: LEN({Tally})/2 If ...
0 Replies 0