web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can you have search an...
Power Apps
Unanswered

Can you have search and filter functions with current user filter as well?

(0) ShareShare
ReportReport
Posted on by 47

Hello all,

 

I have seen many examples of people using multiple gallery functions such as search, filter, and sort. However, I have not come across any examples of people using those functions along with filtering the gallery by the current logged-in user.  Is that something that is possible? Does anyone have an example of someone achieving this? 

 

When I try in my code, it affects the search and sort functionality and does not properly load the list. But I can use those functions separately (one or the other) 

 

If (
 Dropdown2_1.Selected.Value = "All" && MySearch.Text = "",
 'Approvals List',
 Dropdown2_1.Selected.Value = "All" && MySearch.Text <> "",
 Filter (
 'Approvals List',
 MySearch.Text in 'Request#',
 'Created By'.Email = User().Email
 
 ),
 Dropdown2_1.Selected.Value <> "All" && MySearch.Text = "",
 Filter (
 'Approvals List',
 Status.Value = Dropdown2_1.Selected.Value,
 'Created By'.Email = User().Email
 )

 

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Caterpillar_94,

    I have tested that I could combine the sort and search with User() function.

    What's your story? Records meeting the condition disappears from the Gallery?

     

     

  • Sid_98 Profile Picture
    103 on at

    Hi @Caterpillar_94 ,

    You can try this code below:-

    If (
     Dropdown2_1.Selected.Value = "All" && MySearch.Text = "",
     'Approvals List',
     If(Dropdown2_1.Selected.Value = "All" && MySearch.Text <> "",
     Filter (
     'Approvals List',
     MySearch.Text in 'Request#',
     'Created By'.Email = User().Email
     ),
     If(Dropdown2_1.Selected.Value <> "All" && MySearch.Text = "",
     Filter (
     'Approvals List',
     Status.Value = Dropdown2_1.Selected.Value,
     'Created By'.Email = User().Email
     )
     )
     )
    )

    I hope this works for you. 

     

    Regards,

    Siddharth

  • Caterpillar_94 Profile Picture
    47 on at

    Hi Qi,

     

    In my case it causes the search and sort to become ineffective. When you search there are 0 results when you select a filter from the drop down it shows 0 results. It will only show results on the default drop-down of all. If I take out the User(), everything works again.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard