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 / Combining Search, Filt...
Power Apps
Answered

Combining Search, Filter, and Sort for a Gallery

(1) ShareShare
ReportReport
Posted on by

I have two functions that work on their own.... but can't figure out a way to combine them into one function.

 

Search(Sort('Permit Management','Project Name',SortOrder.Ascending),'Search Input'.Text,'Project Name','Work Order')

 

Filter('Permit Management','Project Status'='cmbProject Status Filter'.Selected.Value)

 

Permit Management = Dataverse table name

Project Status is a Choice Column with a combo box named Project Status Filter

 

Would you need more info than this?

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @marshallzart - 

     

    Sort(
     Search(
     Filter(
     'Permit Management',
     Len('cmbProject Status Filter'.Selected.Value) = 0 || 'Project Status' = 'cmbProject Status Filter'.Selected.Value
     ),
     'Search Input'.Text,
     'Project Name',
     'Work Order'
     ),
     'Project Name',
     SortOrder.Ascending
    )
  • Mitanshu Profile Picture
    1,656 Moderator on at

    Can you try this formula:

    With(
    	{
    	baseTable:
    		Filter(
    		'Permit Management',
    		'Project Status'='cmbProject Status Filter'.Selected.Value
    		)
    	},
    	Sort(
    		Search(
    			baseTable,
    			'Search Input'.Text,
    			'Project Name','Work Order'
    		),
    		'Project Name',
    		SortOrder.Ascending
    	)
    )

     

    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 this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • marshallzart Profile Picture
    on at

    This worked perfectly, I'm new to this so I will spend some time trying to understand how/why it works

  • marshallzart Profile Picture
    on at

    Thank you, I tried this but it ended up changing a lot of the Project Names from what they are named in the columns. The functions worked (ie sort, search and filter) though.

     

    The solution Amik posted above did exactly what I was looking for though. 

    Thank you

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @marshallzart - note that the code offered by @happyume is useful in case you're using SharePoint (the Search function is not delegable with that data source).

  • marshallzart Profile Picture
    on at
    @Amik
     
    I have come back to this formula because I need to only include Approval Status (column name) that equals Approved. There's only 3 choices for that column (Pending, Approved, Rejected). Any idea how I'd add that?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 308

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard