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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combining Search, Filt...
Power Apps
Unanswered

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,679 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,650 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,679 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard