cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CamiloHU
Regular Visitor

Combining Sort, Filter and Search on a Gallery

I have a gallery linked to a list in sharepoint and, I already have it previously sorted by priority in descending order.
(Like this: Sort('Matriz de necesidades(Building)';Prioridad;Descending))

CamiloHU_0-1634316550343.png

 

But I need to create a series of filters and a search bar and, therefore, I need to combine the formulas and, I don't know exactly how to do it, every time I try to implement it I get errors. I need to implement a search bar to search for specific items and, additionally, I need to make 3 filters, one of employees, one by project status and one by date range but, I don't know how to combine the formulas into one to put it in the "items" formula of the gallery.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jeff_Thorpe
Super User
Super User

Here is a link to a video that @RezaDorrani did on Power Apps Sort and Filter on Multiple Columns. I think you will find it very helpful and informative.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

Hi @CamiloHU 

 

I see another response while I was working on this. Anyway here is the filter that you are looking for.

 

StalinPonnusamy_0-1634332127183.png

 

With(
    {wCode: IssueTracker},
    Sort(
        Filter(
            wCode,
            //User Search
            (IsBlank(UserComboBoxSearch.SelectedItems) || IsEmpty(UserComboBoxSearch.SelectedItems) || UserComboBoxSearch.Selected.DisplayName in 'Assigned to'.DisplayName) 
            
            //Project Status Search
            && (IsBlank(ProjectStatusDropdown.Selected) || Status.Value = ProjectStatusDropdown.Selected.Value) 
            
            //Ttitle Search control
            && (IsBlank(SearchTitle.Text) || SearchTitle.Text in Title) 
            
            //Start Date
            && (IsBlank(StartDateC.SelectedDate) || Created >= StartDateC.SelectedDate) 
            
            //End Date
            && (IsBlank(EndDateC.SelectedDate) || Created <= EndDateC.SelectedDate)
        ),
        Title,
        Ascending
    )
)

 

Please Subtitle based on your data source.

 

View solution in original post

3 REPLIES 3
Jeff_Thorpe
Super User
Super User

Here is a link to a video that @RezaDorrani did on Power Apps Sort and Filter on Multiple Columns. I think you will find it very helpful and informative.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

Hi @CamiloHU 

 

I see another response while I was working on this. Anyway here is the filter that you are looking for.

 

StalinPonnusamy_0-1634332127183.png

 

With(
    {wCode: IssueTracker},
    Sort(
        Filter(
            wCode,
            //User Search
            (IsBlank(UserComboBoxSearch.SelectedItems) || IsEmpty(UserComboBoxSearch.SelectedItems) || UserComboBoxSearch.Selected.DisplayName in 'Assigned to'.DisplayName) 
            
            //Project Status Search
            && (IsBlank(ProjectStatusDropdown.Selected) || Status.Value = ProjectStatusDropdown.Selected.Value) 
            
            //Ttitle Search control
            && (IsBlank(SearchTitle.Text) || SearchTitle.Text in Title) 
            
            //Start Date
            && (IsBlank(StartDateC.SelectedDate) || Created >= StartDateC.SelectedDate) 
            
            //End Date
            && (IsBlank(EndDateC.SelectedDate) || Created <= EndDateC.SelectedDate)
        ),
        Title,
        Ascending
    )
)

 

Please Subtitle based on your data source.

 

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

Hi @CamiloHU

 

Please let us know if anything needs on your post. We can help with this.

Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,217)