Connecting users as friends

Hey guys. I’m trying to create a functionality where users can connect to each other in a friends like way and I’m trying to figure out the best way to do this.

So far I’ve created a “list of users” field called “friends” for users in the database. So I should be able to add either username or e-mail of any user to any other users “friends field”.

But I haven’t been able to figure out the workflow.

I’ve got an input field for “username” and/or “email” (doesn’t really matter to me which I use) and a submit button. The workflow for submit button I can’t get to work.

Anyone who has done something similar who can point me in the right direction?

Don’t add the username to the Friend list, you want to add the “User” to the list. Can you share a screenshot of your setup?

Not sure what you mean by setup, but here’s the workflow, as far as I get without encountering errors.

How do I translate and validate the input from the input field into a user and then add it to a list?

Where is the button to actually add the user? Is it from a repeating group? If so, you’d use, “Friends add Current Cell’s User”

Ah no. It’s an input field without parent. It’s like in Snapchat – you need to know your friends username in order to add them. So you input the username and if it’s a match you get your friend added.

42

Oh ok. So you would need to use something like:

Friends add Do a Search for Users (username = input Username’s value):first item

That worked perfectly. Thanks a lot!

1 Like