Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

filter gallery based on logged in User

(0) ShareShare
ReportReport
Posted on by 39

Hi everyone,

I am trying to create a screen where there's a gallery connected to a SharePoint List, In this SharePoint List, there's a column that lists who requestor and Approver for requested items, I want to Filter this gallery to show only the entries of the current user logged in in the system.

ill have try this:

Filter(
    ColDMAT,
    IsBlank(ComboboxCanvas2.Selected.Value) || IsEmpty(ComboboxCanvas2.SelectedItems) || 'Request Status' in (ComboboxCanvas2.SelectedItems),
     Requestor.email = varUser.email || Approver.email = varUser.Email
)
 
and also this.
Filter(
    ColDMAT,
    'Created By'.Email in varUser.Email || 'Modified By.Email in varUser.Email && (IsBlank(ComboboxCanvas2.Selected.Value) || IsEmpty(ComboboxCanvas2.SelectedItems) || ComboboxCanvas2.Selected.Value in "All" || 'Request Status' in ComboboxCanvas2.SelectedItems)
)
result still the same.  "App don't find any data".
  • Verified answer
    WarrenBelz Profile Picture
    146,653 Most Valuable Professional on at
    Re: filter gallery based on logged in User

    @Khairul_Amri ,

    The idea was not to have a Delegation warning, hence the pre-filter. So breaking it down to its elements, does this return data (I assume you have records where you are he Requestor or Approver)

    Filter(
     ColDMAT, 
     Requestor.Email = User().Email || Approver.Email = User().Email
    )

     

  • Khairul_Amri Profile Picture
    39 on at
    Re: filter gallery based on logged in User

    appreciated for your reply, I don't know, delegation warning doesn't appear, my syntax seems good, no error or delegation sign.  but apps can't find any data.

    Khairul_Amri_1-1710387858664.png

     

     

  • WarrenBelz Profile Picture
    146,653 Most Valuable Professional on at
    Re: filter gallery based on logged in User

    Hi @Khairul_Amri ,

    Assuming Requestor and Approver are both Person fields, then your issue may be Delegation with the in Filter - try this - note the top filter needs to return record numbers under your Data Row Limit.

    With(
     {
     _Data:
     Filter(
     ColDMAT,
     Requestor.Email = User().Email || Approver.Email = User().Email
     )
     },
     Filter(
     _Data,
     Len(ComboboxCanvas2.Selected.Value) = 0 ||
     'Request Status' in ComboboxCanvas2.SelectedItems
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard