Setting up Course "Favorites"

I’ve watched this video: https://help.adalo.com/how-to/how-to-create-a-favorite-button

But I feel as though there was some editing done to the video that leaves something out and I’m not grasping the lesson.

My app goes like this:

login screen > list of courses screen > list of course videos screen > video watching screen

I would like to put a like button on the “list of course videos screen” that allowed people to favorite the course whose list of videos were displayed on that screen.

I have created a relationship between Users and Favorite Courses (many-to-many).

However, when I place my toggle button on the “list of course videos screen” I am unable to select from the “what does this toggle” dropdown as there is nothing listed there.

Can anyone help? Thank you!

Hi Tanner :wave:

Check whether the Current course data is linked to the videos screen and created the relationship correctly with the Users collection.

And I think you mean like this right?

Hope it helps!

Thank you

1 Like

Standby, let me do a quick screencap. I should have done that in the first place.

Not sure exactly where you’re at with this, but I like to just include a toggle with a true/false property under user that’s named like “user favorite” and then I can easily filter a list by the true/false property.

@dilon_perera hopefully this helps

1 Like

It’s not opening

Try one more time. I’m sorry. My vimeo settings were defaulted to private. I’ve corrected it so the embed up top works.

1 Like

Hi @tanner,

It’s pretty simple. In your course videos collection, create a many-to-many relationship with the Users collection. (Add property > Relationship > Users > select 3rd option)

Then, if you have a simple list, click on the “right section” category and enable it. Choose toggle instead of icon. Then, for what it toggles, choose the relationship you named. The default is “Users”.

Let me know if this helps!

1 Like

I watched the video. You don’t need another collection (Course Favorites). Create the relationship between the Courses collection and the Users collection. Then you can name the property created on the courses collection like Favorites Users and you can name the property that created on the Users collection like Favorite Courses.

And then you will able to see in that toggle as Current course>the created relationship property (Favorite Users)>include logged in user. The add that. And you can add a list on your profile page and connect the list to the Courses collection and you can filter as Logged in user > relationship property ( Favorite Courses).

Thank you

1 Like

I’l give it a whirl, thanks Dilon.

1 Like

Your welcome Tanner

So, I think it’s working but the toggle button will not show… I thought maybe it was an arrangement issue (bring to front, send to back, etc) but I can’t get it to show when previewing now. Am I missing a setting?

Yes because the toggle is not fixed to top. So you can Group the App bar and the toggle ( Select the App Bar and press shift and select the toggle and click make a group) and go to the edit styles and set the fixed type to Top.

1 Like

You’re brilliant @dilon_perera, thank you so much. Works like a charm.

2 Likes

Thanks and Your Welcome :+1:

2 Likes