Hi all.
New day – new challenge:)
I’m in the process of creating “favourites” for users. So, user clicks on “heart” icon and related item is saved as his favourite.
I’ve done some research and based on my small experience with bubble I understand that it is better to create a dedicated data type for Favouries. And create a relationship between this data type, User datatype and items (Projects in my case) datatype.
I would appreciate any thought if my set up looks correct
Thanks!
Not quite
Favourite should be:
User
Project
That’s it. No lists. When a user favourite’s something it creates a new favourite. To display the favourites on a project, Do a search for Favourites where project = the relevant project
You need to think more about what your previous structure is actually doing. A data type is a thing. In this case, it’s a Favourite. What do you need to know about a Favourite? The User who did it and the thing they did it to, and probably nothing more.
Why would you want a list of Users or List of projects on the favourite? etc
1 Like
Thanks!
I was trying various options just to make it work. Regaring lists – the idea behind it was to add a list of users that added certain project to their favs. However, this is no the must have for me now…
Trying to set up the workflows now. I’ve managed to create an “add to favs”, however struggling to make the “delete from favs” flow…
This is really Bubble basics so you might want to check out academy videos. To delete a user’s favourite, Do a search for Favourite where Project is the relevant project and user is current user.
Thanks! Yeah, I’m watching those videos, but the case each time is slightly different, so I’m not always able to get the point.