Press button based on formula - Create Streak function for advanced habit tracker

Hello,
I am trying to create a useful habit tracker once and for all:)

I am struggling to create a „streak“ feature - a column counting the number of consecutive days.
(Similar to this thread: Number of consecutive days - streak)
The difference is that I have different schedules (daily, weekly and monthly habits) and frequencies (once a day, three times a week etc) for each habit.

There are three approaches in all of which I am stuck:

  1. Create a separate table to track only the streaks:

Here I would need to press a button in a specific row („Achieved add row“) , based on a change in the table (Column Achieved? = „Achieved“).
I haven’t seen a way to do that?

  1. Count the streak instantly based on the habit master table.
    Here I absolutely dont know how to filter and count each habit and its streaks.

  2. Create different „master tables“ based on the frequency. Here again, I would need to be able to add rows to different tables via the same button with an if statement.

I would highly appreciate your input, because I am stuck for some weeks already.
This is my habit tracker template. Feel free to modify it as needed.

Thank you,
Simon

1 Like

Dear @Simon_Heuschkel,

To be straight forward, it’s a very interesting question/challenge and at least for me, not a quick fix. (meaning in < 15 minutes, I can reply with some value).

The community members that have build games in Coda have for sure faced a similar challenge and this will also be the location where I will search for inspiration.

If there doesn’t come support before the weekend, I will try to give it a shot :rocket:

Dear Jean Pierre,
Thank you for your answer and help. I would highly appreciate it and also share the template once its done with the community. The game tip is interesting!
Chers, Simon

Dear @Simon_Heuschkel,

I have to admit, that this challenge is also for me, too complex :thinking:
I had the chance to play around for some time, but I didn’t find a way around to solve it and hopeful we will get some support.

Just to questions from my side, that might be important for the person that feels able to assist:

  1. When it’s a single daily task, the button should be able to execute during one day only once, isn’t it?
  2. When a multiple daily task (like drinking water 8x), you want to record also even if it are 11 times / day?

Hi @Jean_Pierre_Traets,
Thanks you for trying it, lets hope we get some more insights. :slight_smile:

To answer your questions:
In both cases what you are describing would be the ideal case. However, if only the other option would work (more than once, or only 8 times a day) this wouldn’t be a dealbreaker to me.

Dear @Simon_Heuschkel,

Doesn’t mean I am giving up.
Will try to get assistance on “smaller” challenges that need be found a solution for, to be able to solve yours. This is one of them: Q: List with dates, how to find the second, third, ........ ranked score? 🤔

Recommend to check out this post

Hello Again,
I finally made it work with a few work arounds.
1.) I created a separate table that tracks only the streaks (Streak Log Master) and created a complicated formula in Habit list with current streak count (all schedules), that counts all the streaks for each habit.
2.) I added buttons to the habit list table, that can only be pressed once a habit goal is achieved.
3.) I created a master button that clicks all available buttons in habit list, and also deletes dublicates in the streak log master table (in case they sneaked in)
4.) I created an automation that triggers the master button daily at 00:00.
That way its fully automated and the streak function works too.
https://coda.io/d/Habit-Tracker_d6O0UGTIh1t Feel free to use it. I will publish the doc once the other trackers like finance tracker etc, are included as well.

Have a splendid day

3 Likes

Dear @Simon_Heuschkel,

That’s a serious accomplishment and must give a great feeling that you managed to build it :building_construction:

Thanks updating on your project progress :trophy:

1 Like

Hey @Simon_Heuschkel this is cool - but comment only; can’t look at formulas or copy. Thanks!

Thanks for the heads up. It should work now.

Hey, so after some minor improvements I finally found the time to make this into a doc that everyone can use, adopt and copy. Let me know what you think and if you have any improvements.

2 Likes

deeply thank you, i need this in my life so hard

1 Like