Simple timer with pause/continue capability (single table design)

A super simple task time tracker / stopwatch that supports pausing the timer. Done in a single table; leverages Coda’s capability to store lists of values in a cell.

Can be handy if you want to track net time spent on your tasks. You can further aggregate on these lists of clock-in/clock-out times, e.g. calculate the total time per task from start to finish:

[Clock outs].Max() - [Clock ins].Min()

or calculate individual intervals:

Sequence(1, thisRow.[Clock outs].Count()).FormulaMap(
  thisRow.[Clock outs].Nth(CurrentValue) - thisRow.[Clock ins].Nth(CurrentValue)

or calculate the sum of break times, but filter out breaks that are 3+ hours long, you name it


And the machine strikes again! Good work man.

1 Like

Very simple and useful in most of cases :+1:

Any idea why the formula stops at 3h of work?

Looks like they can run with just one entry, but they break in the next one. That intrigues me, and unfortunately limits the usage like:
Long tasks for video editing, that I work whit, are normal.
And you can’t use for calculate work shift in the most cases.

Stops at 3h?.. This seems strange. Maybe it’s just a formatting issue. I don’t see why it could possibly stop working.

Will let it run today and debug.

UPD @Christian_Conte Not sure what you saw. I edited the first clock-in, and it’s working:

What could be happening is that if you manually edit the value once there’s a few timestamps in the cell, it stops being a list and becomes just a string with commas. So yeah, don’t edit timestamps when there are some in the cell already:

1 Like

Also CC @Raul_San_N.H — I remember you were interested in adding time tracking in one of your docs. Here’s a simple way to add that to the existing table.

1 Like

Very clever and handy too. When will you publish the Unofficial Guide to All Things Coda?

Hi @Paul_Danyliuk
Is there any advantage in using this approach over logging time in separate table, as in Want to track your time across tasks??

Just the advantage of not having to use a separate table :slight_smile: Could be cost advantage for some (intervals not counting towards the rows quota in free plan).

The disadvantage is explained in a gif above: you cannot edit the timestamps without losing the “list” status of the cell.

This template serves more of a “FYI this is possible too” purpose, like most of my templates do.

1 Like

Great solution @Paul_Danyliuk. Thank you for the ping here!

@Paul_Danyliuk Tanks, i just tried do that for test the thing and end breaking it in a way that not will happen naturally UAHUAH

@Asaf_Dafna, In my case, things that is interesting to have more control on each entrancei like of take this “each row is a entrance” approach.
Like in this table:

But for making a work shift doc, were i wish to use a use each to store one shift , this give the flexibility that I need for making multiple breaks in the same shift without need to restrict how many breaks they will have :grin:

In the other centenary I was forced to use the extra shift if some employ really need one more break than I predict, what just f* the things. You can do more than one extra shift by day, but they also COST MORE.

Plus, if you set a big break limit, like “5 breaks per shift”, you making a incentive to they pick up all the breaks each day, ween i want to stimulate focus and give they freedom to make they breaks ween they need.

Now this is solved :partying_face:

So is not really about of advantages, but more about flexibility an more design choices.
Is one more tool in or coda-belt :bat:
You need to see what of they works best on your project.