cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sammy
Level: Powered On

How to get a filter search and datepicker working at the same time

I am fairly new to PowerApps and I've managed to get a datepicker working and text input filter search working, but not at the same time.

 

Can anyone tell me where I'm going wrong?

 

Datepicker:

Sort(Filter(Pages, DatePicker1.SelectedDate<=Created_x0020_date0), If(SortDescending1, Descending))

 

Filter search:

SortByColumns(Search(SortByColumns(Pages,"Created",Descending),TextSearchBox1.Text,"{Name}"),"Created",If(SortDescending1,Ascending,Descending))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: How to get a filter search and datepicker working at the same time

You can have the result of the Filter function as the first parameter of the Search function (and vice-versa, since the "shape" of the table that they return are the same). For example, this expression should work:

SortByColumns(
    Search(
        Filter(
            Pages,
            DatePicker1.SelectedDate <= Created_x0020_date0),
        TextSearchBox1.Text,
        "{Name}"),
    "Created",
    If(SortDescending1, Ascending, Descending))

View solution in original post

2 REPLIES 2
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: How to get a filter search and datepicker working at the same time

You can have the result of the Filter function as the first parameter of the Search function (and vice-versa, since the "shape" of the table that they return are the same). For example, this expression should work:

SortByColumns(
    Search(
        Filter(
            Pages,
            DatePicker1.SelectedDate <= Created_x0020_date0),
        TextSearchBox1.Text,
        "{Name}"),
    "Created",
    If(SortDescending1, Ascending, Descending))

View solution in original post

Sammy
Level: Powered On

Re: How to get a filter search and datepicker working at the same time

This worked perfectly. Thanks for your help!

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,248)