How can I show only the current user's related store’s orders?

In my bubble app I have a repeating group within a group that’s within a group.
The repeating group shows the list of orders, thats linked to the store, which the store is linked to the current user.

are there different ways to approach this or is the data > privacy setting the way to go?
In my Orders privacy settings, I’ve tried writing the expression below,
When This Order’s Store’s User’s UserRole is “Admin”
But did not work.

The data source of the repeating group should be the current user’s related stores

so its not Search for Orders??

can find “current user’s related stores” though :confused:

Do a search for Orders who’s Store is the Current User’s Store

You should also set up privacy rules on the data as well to make it private.

don’t see anything think like “who’s Store is…” as an option :confused:

don’t see anything think like “who’s Store is…” as an option

No… you won’t see that… I meant it literally…

I don’t know how you’ve built your app or your database, so I can’t give you the exact instructions for your app specifically… (it depends how you’ve related your datatypes to one another, and what you’ve named your fields).

Btu you need to do a search for Orders who’s Store is the Current User’s Store - how you define that in your database, I obviously don’t know - feel free to share your database structure if you want some more specific help.

1 Like

Thank you,

My structure is;

User
Unique id
email

Store
Store Name
User id

Order
Order Number
Store id

You can do a search for Orders, who’s Store is a search for Stores who’s User is the current User

You need to add :first item after the search for stores.

thank you sir, these bubble operations are really tricky…:confused:
I guess it’ll come easier when I get the hang of it?

2 Likes

Unlikely.

1 Like

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