Forum Academy Marketplace Showcase Pricing Features

Database/repeating group how to only show data from user that is logged in

I am working on a repeating group where I only want to show the current user’s information.

So, I have 2 types, and a form where a user can add more things. my 2 types are user and equipment.

in the repeating group I only want to show the current users equipment.

Can some please help me

There are several ways to do do this, depending on how your database structure is set up.

The simplest way is to make sure each user has a field for equipment, which is a list, so I’m assuming that’s the case here. Then all you need to do is the following…

Set the content type of your repeating group to Equipment

Set the data source to Current User's Equipment

Then in each cell you can reference any field you like of the equipment to display the appropriate data.

still not working

You don’t want to reference the current user in your text box, just the current cell’s data (the repeating group itself should reference the current user in it’s data source).

Also, it doesn’t look as though the ‘Equipment’ field on your user datatype is a list. That means each user can only one ‘Equipment’ entry linked to them, so there’s no need to use a repeating group to display that, you can just use a regular group.

I suspect you’re intending to allow a user to have multiple ‘Equipment’ entries on their record, in which case you’ll need to modify the user datatype and add a field for ‘Equipment’ that is set to be a list.

Then the steps outlined in my previous reply will work.

I made the change in the data base and changed the text in the repeating group but when trying to change data source in repeating group it self I am have issues

You don’t need to do a search…

You data source just needs to be Current User's Equipment

now nothing shows up. but I think we are getting there.

do I need a field in equipment to show the user who created the thing?

Not necessarily, although it might be a good idea (it really depends on the number of users you’re anticipating on having and how and where you want to access certain data).

I’d recommend reading the Bubble manual chapter on connecting data for more info on best practices for linking datatypes, if you’re wondering what the pros/cons are of two-way linking.

That is already a default function of Bubble. In your database their is a ‘creator’ field for every data type by default and it is of type user, so any user that creates an entry of type equipment in your database will be saved as the ‘creator’

Due to this one other way to get the data in the Repeating group is do a search for equipment and use a constraint that creator equals current user

if I do a text box the constraint works but not in repeating group.

Also because I have equipment in a list it is separated by a comma I wanted each piece of equipment in a row in the repeating group.

1 row the first piece of equipment type, year, make, model, colour etc.
next row the next piece of equipment

a user can have 30 or 40 pieces of equipment that I would like them to be able to see nice and organized without being able to see other users equipment

What do you mean by it doesn’t work? What’s the issue?

What does the issue checker say?

If the entire list is showing in one cell you must be referencing the entire list rather than just the cell’s entry - unless you’ve set up your data source wrong.

current user is darlene, she has one piece of equipment it is white. if I use text box it works if I use repeating group I get nothing

Ok, great. If it works then just stick with what you’re doing. Glad you got it sorted :slight_smile:

no it does not work the way I want

this is what I have

type User
Cell phone - text
Company - text
Equipment - list of Equipments
First Name - text
Last Name - text

Type Equipment
Colour - text
Fuel Type - text
Make - text
Model - text
Type - text
Unit Number - text
Year - text

I have users that enter their equipment. it gets added to the the database. I want a table that shows the users equipment 1 piece of equipment per row.

if Darlene is logged in and she has 3 pieces of equipment then like this

Car 2017 Toyota Highlander White 18-122 Gasoline
Truck 2015 GMC 2500HD Grey 18-134 Diesel
Skid Steer 2006 Bobcat S40 White 18-065 Diesel

This is what I want Darlene the user see when she is logged in. I do not want her to ba able to see anyone else’s equipment.

Is this possible?


As I said before, all you need is a repeating group with the content type set to ‘Equipment’ and the data source set to ‘Current User’s Equipment’.

Then add your text element inside the cell to display the relevant data such as make, year, etc. (referencing the current cell’s equipment).

If you’re still struggling to set it up feel free to post some more screenshots of your repeating group and text element properties so I can see what you’re doing wrong.

ok trying again! Thank you. I do appreciate the time you are spending helping me!

That’s it. Is it working ok now?