Forum Academy Marketplace Showcase Pricing Features

Displaying data for company & employees

I’m new to Bubble and pretty sure what I’m trying to do is very easy, but I just can’t get my head around it yet.
I’m trying to build an app that will have have two levels for a company (Employees & Managers)
The employees are essentially “Users” and the Manager will have permission to view a dashboard which will display a list of all the employees at that company and their respective data.

In my DB I have a Thing for User which has a field “Company”
I also have a Thing for Company and it has a field for “Employees”, which is a list of Users.

I want to populate a repeating group with data about each employee at the company when the manager is logged in.

In my RG, I have inserted a text box calling up the Current cells User First name.

When I check the previewer, it just shows the current user in the RG. IT doesn’t list the other Users who are at the same company.

Can anyone point me in the right direction?
I’d really appreciate it. Cheers

My bet is that it has something to do with privacy settings. I’d create a boolean on the User entity/table (“IsManager” yes/no) and base the privacy rule on that.

When CurrentUser is IsManager then he/she can see all users. If not, the user can only see his/her own user record.

Just tested this and works;

1 Like

@rory.mulligan

Perhaps you can remove any and all privacy rules (if there are any) in your app until you are more familiar with Bubble.

1 Like

Thank you both for helping me with this one.
It seems you are both right, and it looks like it is working now.
However, my latest struggle is with displaying specific content to a User.

My RG is using the follow Data Source:

This is working and populating the information for the users personal data, but I cannot go a level deeper to extract information about a User’s thing.
The below screenshot shows that I’m trying to count the number of qualifications a User has.

I would also like to count the number of qualifications that have a Status = Active.
Or the number of qualifications that have an expiry date that is not less than 30 days away.

I thought this would be easy, but it’s a real struggle for a beginner like me.
My Bubble learning journey feels like it’s 2 steps forward and 1 step back.

Cheers