Repeating group - showing data from things based on user (or not)

Hi all,

I am very new to Bubble so this is probably silly issue to a expert user (I will keep this disclaimer for a while).
Here is the thing: I created two different types of user (let’s say “professor” and “student”), the idea of the database is that the “student” users creates things (records which become rows in the database) and then is able in a page to see all the records he/she/they created but not those created by others; and this is working.

I then need to create a page where users “professors” can see all things (records) created by all “students”, I then of course make a selection of data visible or not. My issue is: I am not succeeding in showing ANY records that is not created by the user logged in, so “professor” list keeps being empty as in my logic “professors” do not create records, but they should see and answer records created by student eventually.

I checked and re-checked all constraints in all groups and sub groups (usually before posting I try 2 hours to solve on my own), did the repeating group over new, but still is not showing the any “things” when I am in “professor” view.

This is weird as initially I thought I would’ve had the opposite problem (how to make visible only records created by a “student” by the given “student”).

Anyone can help me in checking where the issue could be?

Thank you all,

Hi there, @AndyFat… the main question on this one is how are you associating a professor with their students? Without a “direct” association of some sort, you can’t configure your privacy rules or set up your search constraints in a way that enables a professor to see the things their students have created. If you can share some more details (screenshots would be great) about your setup, I’m sure someone will be able to help you get this one sorted out.


1 Like

Hi @mikeloc,

thanks for at this point usual availability (we must have some compatibility in terms of time zones).
Main database (Data Type User) is structured that a user can sign up as “student” or “professor”, then there is another Data Type “Records” which contains the things created by users and this Data Type is where I get data from to create the views of the records I need.
Your comment was enlightening (surprise!) as I found that I set a correct privacy constraint: “when creator is current user” which is actually what I need to work around.
I am now thinking of creating a parallel Data Type without privacy constraint with reduced information without privacy contrasts, but as you told me the point would be creating the link between the two database, maybe working on unique IDs? Is there some standard way to manage this kind of things? The point is totally what you mentioned

I will keep trying in the meantime, maybe trying to check the “Everyone Else Can see these information” boxes

Thanks again,

There isn’t necessarily a standard way, per se, but you need to create the association I mentioned. In your case, it could be as simple as having a professor field (with a field type of User) on the data type where the student things are being created. Then, when a student creates a thing, populate the professor field with the student’s professor. With that field in place, you would be able to create a privacy rule that says when the thing’s creator is the current user or the thing’s professor is the current user, allow the thing to be found in searches and allow its fields to be viewed.

Definitely do not just “blindly” check the Everyone else boxes because that can defeat the purpose of the privacy rules.

1 Like

Understood, point is that I would like to have all “professors” being able to see all Things (I am thinking about setting a geographical distance constraints: i.e. issue visible to “professor” if the “student” and “professor” address is within a certain mileage range), and the blind way partially worked which of course it means it didn’t work as now of course now all “students” are able to see the requests created by others and this is not what I want.

So, wouldn’t it be better to allow some data to be visible fro everyone and then put in the “student” repeating group a constraint to be able to see just those created by them (if is there a way)?

I tank best way is that when record is created some data would go into a different Data Type publicly visible. I will then come back once I would not find the way to link the two databases (basically when “professor” will answer the “student” request)…

If you want all professors to be able to see all of the things created by all students, you probably don’t need to add any fields at this point because a privacy rule that is something like when Current User's type is Professor on the data type where the things are being created should do the trick.

1 Like

…and you would put this rule in the data types privacy options?

Yes… on the data type where the student things are being created. You could actually have only one rule on that data type that says when the thing’s creator is the current user or the current user’s type is professor.

1 Like

The was it!!
I keep building now.

Thank you,

1 Like