Hi all.
I’m looking for a solution to let the user add other users’ profiles to a list of favorites.
I have added a “like” icon to each profile item in the repeating group, but I can’t figure out what should be the workflow and database settings.
Also, I want the separate list of favorites to appear as another category in the side menu, when there is at lease 1 profile is added to favs by the current user.
Please see the attached images.
Thanks.
Hey @chuprygin I think the easiest way to do that is to add a new field on your user table named “liked users” as a list of users, when the current user click on the liked button it add the user liked to the list of “liked users” of the current user, then you can display all the current user “liked users” as you wish in your other category
When there is at least 1 fav by the current user your can make a condition in your “fav category” which is “when current user liked users > 0” this element is visible
Plus : for the workflow, when the like button is clicked you can :
1 - make change to a thing
2 - in the make change the thing we want to change is current user
3 - we’re gonna change the list of liked users and add the user you just cliked on (current cell’s user)
I think it can work like that, if you want to share me a loom or more informations about it let me know
Just to warn you, your mileage will be limited by your current database structure. You’ll find it difficult to allow multiple users to work on a listing, configure appropriate privacy rules, and let people interact with listings. You would benefit from creating a data type Project. The Project contains a List of Users (users who have access to it) and the User has a Listing attached.
You’ve implied this already through your DB naming (‘project image’, ‘project name’ etc.). That should raise a flag to you that maybe those images/names should be part of a Project, not User Easier to change now than later.
3 Likes
Thanks, I think this will work for me:)
1 Like
Hi! Thanks for sharing this. I assume in order to change my data structure the only way is to erase all existing index conditions, workflows and data sources and build again from scratch?
Yes you need a Project datatype
Also this is good structure for Liking Trying to forward think - #4 by tylerboodman
1 Like
Yes, but don’t let that deter you. It won’t take as long as you think. Additionally, it’s like 10x better to do it now than 6 months from now.
2 Likes