I am trying to create a habit tracking

I am trying to create a habit tracker. I have created a habit page where users can browse pre-made habits and then ‘adopt them’. Once they are adopted they go to the users daily tracking page and are on the their list of habits.

I want users to be able to see their habits each day and then tick them off and keep a log of days they achieved habits and missed habits. Glide keeps telling me I need to use template columns and relation columns which is not working as Glide it is telling me to relate 3 columns and glide only lets you relate 2.

Can anyone help me. I am getting really disheartened.

1 Like

I would have a users table, habits table (where user’s habits are that includes their userID), daily completed habits table (which has the user id and habit id added when a habit is completed), and a table of pre-made habits to choose from. The Habits Table would have a query to the completed habits table linking a completed habit row for the current day. If empty then the app would show the habit as needing to be completed. Once done the appearance of the habit can change (like a checkmark or star).

I have completed the first part you have mentioned but could you please walk me though this part - ‘The Habits Table would have a query to the completed habits table linking a completed habit row for the current day. If empty then the app would show the habit as needing to be completed. Once done the appearance of the habit can change (like a checkmark or star).’

I think this represents what he means. Can you show us what you have set up?

The “template column → relation column” (creating matching keys in two different tables) suggestion is a bit outdated (though still perfectly feasible). We now have access to Query columns instead.

That being said, I’d set it up like this: