Toggle/icon list within a list

Hi there,

I’m trying to create a habit-tracking functionality. The idea is that you would have a list of created habits, each habit with a certain number of either toggle buttons or icons. Every time you click on the toggle/icon, it would change (to active/another icon) and add one completed event for that particular habit. You could then visually see how many times you have done that habit over the week.

What I have so far is a Habits collection and a Habit tracking collection (screenshots below). Their relationship is such that one habit can have several habit tracking events (habit counts to be exact, but I couldn’t name it that of course).


I know the properties are all wrong (for instance, both collections have a Done count) but I don’t know how to define them. I’m still learning the programming logic!

I have managed to create new habits and have a list of those habits, but the toggle/icon list is not visible in the preview.




In the screenshots above, you can see that I have Habits and Habit Tracking mixed in the actions, that’s just how I tested the previous time. I have tested with Update Habit > Record Current Habit > Habit done count +1, and
Update Habit Tracking > Record Current Habit Tracking > Habit Tracking done count +1 > Habit tracking done True, and
almost every combination imaginable. The toggle/icon list is not visible in the preview with any of them.

(Down the line, I would like to have a dynamic number of the toggles/icons based on the user’s definition (which the Planned count -property is for), but I don’t think that’s possible with Adalo and it’s not really the point here anyway, I know you were wondering about that property. Pressing the Enter habit Add circle -icon takes you to a modal screen, where you define the number you want to do the habit in a week. By pressing a Create-button you can then create the habit and define the Planned count for it, and go back to the previous screen.)

This seems like a very rookie issue to me that could be fixed with proper properties and correct linking but I just can’t seem to be able to wrap my head around them.

Any help would be appreciated!

Best,
Emma

Hi Emma,

Welcome to the Community! :partying_face:

It looks like you’re having trouble setting up relationships in the database, I would suggest you watch the videos you below to see how to do it.

Database setup by Adalo

This video by @pfordmedia about Database Collections, Relationships, and the Infinite Menu might help a bit.

Finally, this video by @michael.ionita might help you understand databases in Adalo. (just finished watching it, it’s great :slight_smile: )

Let me know if you have any questions after watching the videos! :slight_smile:

PRO tip: If you want a leader/maker to answer your post, I would suggest the following tips:

- Try keeping your explanation short around 3-4 sentences is enough, if they are more than 5, it starts to get overwhelming for the reader and likely won’t answer.

- Include screenshots/and-or/screen recording (you did this :partying_face:) so it could help other makers/leaders trying to understand the bug/explanation.

Hi @Emma

@James_App_Maker is right, you need to ask one issue at a time, maybe two if it is closely related, and focus on just that.

For this, you can look at this thread,

Hi James,

I am Michael Ionita :wink:

You mentioned one video I made below but I think the link to that video is not pointing to my video, instead it’s pointing to the previous video you mentioned in the email.

Thanks for mentioning my video btw. appreciate it. And glad you like it :blush:

Cheers,
Michael Ionita

1 Like

Oh Sorry, I accidentally put the wrong link :man_facepalming:, I’ll change it now.

Hi all,

@James_App_Maker, thanks for your comments and advice! The videos helped a great deal. It looks like I managed to do define the relationships and link the actions correctly, since in the preview, the toggle list started to load (before there was just blank)!

But I’m afraid the loading icon just kept spinning forever, like described in this post: List not loading in preview. Adalo issues or app issues?.

I selected the “Only load & display visible list items”, and set the maximum number of items to display down to two like in this post: Apps not loading lists. But the loading icon just kept spinning.

Maybe I should submit a ticket, too?

@Yongki Thanks for the advice and the link, I will look more closely into it once I’m sure I’m able to get the list working in the first place!

Best,
Emma

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.