So I am have trouble making it possible for my users to add friends the logic makes sense to me but I could be way off.
A friends list should simply be a list of friends. What’s a friend? Another User. Does that help?
nothing seems to actually add the person the the users friends list
You’re doing it right although you do not need that Only When condition (Bubble won’t add duplicates to a list so u can just do away with that).
okay this is what I have now but it still doesn’t seem to work.
Could there be something I am missing?
Here’s the question: How do you KNOW it isn’t working?
Here’s the checklist:
-
Your User datatype has a field on it (a list of type User named “Friends”): Yes
-
What are the DATA PRIVACY ROLES for User’s Friends? Could it be that Friends is only visible to the creator? Not visible to anybody…? Check your privacy options here:
- Once you’ve confirmed #2 isn’t the problem: Drop a Repeating Group anywhere. Set its data source to “Do a Search for… Users… Constraint User’s Friends:count>0”
Make sure you drop a text on it with Current Cell’s User’s Name or email or something.
That will show you all users who have any number of friends. Is it empty? If not, the issue isn’t that Friends are not being added to the list, you’re having a display issue.
Similarly, you might just drop an RG on a User type page and list out Current User’s Friends or a text that reports “current user’s friends:count”. These sorts of simple debugging steps (it’s kind of the Bubble equivalent of console.log()) will often help you discover the thing you’ve forgotten to do…
-
Could it be that your “Button Add as Friend” isn’t actually clickable? (This seems improbably, but perhaps you’ve got a state on it that is setting it to be “not clickable” and you also have no conditional formatting applied that would give you any indication.)
-
You workflow does “Friends add This User” are you sure that This User is who you think it is?
I’m out of simple ideas. What you’re doing just isn’t hard. Something boneheaded going on here. (You’ll slap your forehead when you realize. But I can’t see it from your screenshots.)
hmm so this is strange. When i click add friend the cureent user does not get a new friend instead there person who is trying to be added gets a new friend and its them self. I dont know if that makes sense so hopefully the screenshots help.

It looks like several problems, beginning with the action.
As I understand it, what you want to do is add a person (User) other than the current User to the current User’s list of Friends. If I’m wrong, ignore everything else I write in this post.
If I’m right, what you want to do is Make changes to User, with Thing to change being Current User.
The field to change is "Friends add User (identified as the one you want added to the current User’s Friends list.)
I hope that didn’t blow your mind.
The lists can be confusing. If you’re working with a repeating group where each item in the list is a User, you’ll probably want to add Current cell’s User. In this case, the syntax for the field to change will be something like “Friends add Current cell’s User”.
Without seeing the complete page design, I’m not certain where on the page you’ll have the User you want added to the current User’s Friends list. But however you identify the User to add as a friend, that’s the User you want added to the current User’s Friends list.
If this did not help, please show more of the UI so we can see how the user to add as a friend is identified on the page.
This topic was automatically closed after 70 days. New replies are no longer allowed.