Filter data based on current user

Hi community!

I was wondering: is there a way to create dynamic segments?
What I want to do is to filter one collection with a condition that depend on the context (for instance with user that is viewing the collection).
In my specific usecase, I wish I could filter my Orders collection on the warehouse field with the current user location…

If someone have an idea it would be awesome.
Thanks :slightly_smiling_face:

Hi @adriguy,

Yes you can. You can either:

Hope that helps :slight_smile:


Hi @vince,

Wooh I didn’t see this scope feature, I’ll dig into it.
Looks like it will suit my need.

Thanks you! :raised_hands: