I have a custom table with a column "Email Address". I have a view for this table which I'd like to filter by the current logged in user's email address.
The table looks like this...
The view's filter will be something like below, but how do I refer to the currently logged in user's email address? What should I use in place of Customer().Email?
Hi @PowerAppsCom1,
Not quite for model-driven apps, you manage that through regular/Dataverse security roles. More info on the security model and creating roles:
https://learn.microsoft.com/power-platform/admin/wp-security-cds?WT.mc_id=DX-MVP-5004271
Is this solution applicable to Model Driven Apps?
If yes how do I get started?
Gotchya, I didn't realize it was for Power Apps Portals. To achieve that there are a couple of simple steps to do:
Hope this helps!
Hi @cymorg1,
I think this was already answered in another post. Can you take a look and hopefully it helps? https://powerusers.microsoft.com/t5/Power-Apps-Portals/How-can-we-filter-record-on-portal-based-on-logged-in-user/td-p/536292
Thanks much!
Drew
@EricRegnier Sorry, that isn't the answer. CreatedBy and Owner entities are populated by User objects. I'm looking to filter a list containing a Contact/Customer object by the logged in user's email (or other attribute) in a Power Apps Portal. I'm trying to make a Portal that allows customer to see their own records, for example, a repair request that is created by staff (i.e. a User) and flagged to an existing customer (i.e. a Contact, or in this case by the customer's email address). The customer will then login to the portal and see only records that are flagged to their email address. I hope that makes sense.
Hi @cymorg1,
To supplement on the previous post, depending on your requirement, you don't necessary need that custom email address column. Out-of-the-box, you have modified by, created by and Owner (which the default is the created by user), you can then filter your view with either of those columns. Example:
Hope this helps!
Hi @cymorg1 ,
There is not any OOB feature yet with which you will be able to dynamically place logged in user email address. Here is alternative to this .
* Create a lookup with System User entity
* On Create/Update of email address check if this email address exists for any user using workflow
* if it exist than set new field (lookup) = User
* Create your view for new field (lookup) and select "Equal to logged in User"
Let me if it helps you.
Thanks
Anupam
(please mark as resolved or give kudos if it really helps you)
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
Fubar
11
Super User 2025 Season 1