cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CamiloHU
Frequent 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
Super User
Super User

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.
StalinPonnusamy
Super User
Super User

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.

 

StalinPonnusamy
Super User
Super User

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
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (3,957)