How to allow a user to see data from another user

Hi, I am new to Bubble so please bear with me!
Our app tracks a driver to a customer using a Data Type called “Work Order”.
The Work Order data type is linked to the Driver as a User which is also another Data Type.
I am having trouble figuring out how to get the customer who is also a user to see only the work order that is relevant to them.
Can anybody help with this?

Are you familiar with Privacy Rules in the database?

Hi Doug, not really

As usual, I am not 100% clear on what you want to do, but I’ll take a shot at it anyway!

Your Work Order table has a field type Driver of datatype User, correct?

I assume your Work Order able also has a field type Customer of datatype user, correct?

I also assume your customer needs to log on to get to any data, correct?

If so, why don’t you just make an RG of all Work Orders where Customer = current user’s email (or unique ID, or whatever field you are using to uniquely identify each user)? This way your customer will always see ONLY their related Work Order entries, regardless of driver. You could, of course, also add in additional search criteria for Drivers if needed.

Does this help at all?

Thank you, yes the workorder has a field type Driver of datatype User.
I did not have a field type Customer of datatype user but have now added one in.
Can you please explain what an RG is?

An RG is a repeating group.

Instead of showing just one search result, you can use an RG to show multiple search results. So if Driver A has 20 work orders, your RG can show all 20 of them.

There is no way I can explain RGs in their entirety, so you may want to start with this Bubble video:

Thanks! The driver will only have one work order at a time and the customer will only need to see the most recent one. I’m still a bit confused about how it all works but will have a play around now that we have a customer field in the work order data type

This topic was automatically closed after 70 days. New replies are no longer allowed.