Need simple tutorial on displaying from logged in user

As a new Bubble user, I have been searching around here for a clear and super simple demonstration on how to display the data in a repeating group that pertains ONLY to the user that created it. I know this must be ridiculously simple, but I can find all kinds of tutorials on how to simply display ALL the data in a repeating group. But what I need is to have the group ONLY show the data that was created by the user after they are logged in.

Super simple example: Let’s say I have 3 users. Each user can enter the name and phone number of their best friend and then they log out. I have a separate data type called “My Friends” and it contains 2 fields, one for Name and then for Phone. Each user logs in independently and creates that information. When they log in later I want to simply display their own data of course, not the data of everyone.

How do I create a repeating group that isolates ONLY the logged in user’s data? In other words: Is User “Jon Doe” logged in? If so, just show his friend and phone number. Same for User “Joe Smith” or whomever. I must be missing the basic tutorial for this but I can’t find the answer.

Thanks.

Hi Dan,

To display only the information that’s created by a user after they are logged in try adding the following constraint to your repeating group search

Do A Search For Data Type “Friend” Add A Constraint, Creator = Current User

You could also display the repeating group as follows
capture1

The latter option will be more efficient because the app will not have to load and search all of the friend objects to find the ones created by the current user

Hope this helps,
Evan

You can view more in depth Bubble tutorials here

2 Likes

Hi Evan,

Thanks for the great reply. The data I want to access is in a different table (type) than just the User type. I cannot see how to access that. For example I have an “All Users” type, but then I have an “All Friends” type which holds the particular friend information. When I use the 2nd method you describe and select “Current User’s” the only choices are field from the “All Users” type. I want to access that logged in user’s records that got stored to the “All Friends” type. I hope that makes sense. I’m coming in from mySQL so this is a little different.

I still cannot get this concept to work. This MUST be an easy and basic thing to do.

I have some Users let’s say. I have another Data Type of “Friends” with a field “Full Name” that represents their friends. Each user has logged in, input some friends and logged out.

User ‘A’ logs back in and I need to show them the list of only their friends in a repeating group. Not the entire list of Friends, just the ones that they created. When I try to follow the instructions above, I can only see the fields that are pulled from the “User” type, not the “Friends” type.

When I choose “Current User” in the Data Source field (above) the only field options I see are being pulled from the User data type. I don’t see how I can access the fields in the “Friends” data type.

Once I get this workflow down I can proceed with a big project, but this is the basic thing. Allow a user that is logged in to only see the records that they created that come from other tables (data types).

@underhill.dan

Sounds like you would need to add a “Friends” field (a list of Friends) to your data type User. Then you could easily link Friends to a User and use @253digital’s methods above