Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

How to filter a column by logged in user's email attribute

(0) ShareShare
ReportReport
Posted on by 128

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...
table.jpg

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?

filter.jpg

 

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: How to filter a column by logged in user's email attribute

    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

    https://learn.microsoft.com/power-platform/admin/database-security?WT.mc_id=DX-MVP-5004271#create-or-configure-a-custom-security-role
    Cheers

  • PowerAppsCom1 Profile Picture
    10 on at
    Re: How to filter a column by logged in user's email attribute

    Is this solution applicable to Model Driven Apps?

    If yes how do I get started?

  • Verified answer
    EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: How to filter a column by logged in user's email attribute

    Gotchya, I didn't realize it was for Power Apps Portals. To achieve that there are a couple of simple steps to do:

    1. Setup Entity Permissions to allow the specific web roles to have access to contacts/account that they own
    2. Configure Entity List. Pick your Dataverse view, enable Entity Permissions, and configure Filter Conditions

    Hope this helps!

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to filter a column by logged in user's email attribute

    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

  • cymorg Profile Picture
    128 on at
    Re: How to filter a column by logged in user's email attribute

    @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.

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: How to filter a column by logged in user's email attribute

    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:
    2021-02-22_12-38-56.png

    Hope this helps!

  • Anupam.khasia Profile Picture
    349 on at
    Re: How to filter a column by logged in user's email attribute

    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)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
Fubar Profile Picture

Fubar 11 Super User 2025 Season 1

Overall leaderboard

Featured topics