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 / DatePicker/Search Issue
Power Apps
Answered

DatePicker/Search Issue

(0) ShareShare
ReportReport
Posted on by 10

Hello all,
Your help is very much appreciated.

I am trying to set up DatePickerFrom and DatePickerTo for a Data Table named Report_1.
I already have SortByColumns working properly, but I am unsure of how to add the date pickers.
The column "Tool" is a SharePoint Choice.
I know if I try adding it on my own, I'm going to break the search bar.

 

Can you help me in accomplishing both?

Thank you in advance.
Andy

 

xwingnutx_0-1673363914732.png

 

 

Categories:
  • AlexBakerWong Profile Picture
    79 on at

    Hi,

     

    You would need to use the 'Filter' function so something similar to:

    Filter(Table, isBlank(toDateComponent.SelectedDate) || date <= toDateComponent.SelectedDate, isBlank(fromDateComponent.SelectedDate) || date >= fromDateComponent.SelectedDate)

     

    P.S. you can also include the search in the filter as well using either the 'StartWith' or 'in' functions.

     

    Thanks,

    Alex

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    If I have helped, feel free to donate the Power Platform Duo coffee money: https://www.buymeacoffee.com/thePPDuo 

    Otherwise follow me on:
    LinkedIn: https://uk.linkedin.com/in/alexandrebaker 
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg

  • xwingnutx Profile Picture
    10 on at

    Hi Alex,

    Thank you for your reply.

    I am aware that I will have to add the Filter function, but my limited knowledge tells me I just can't add it after my SortByColumn function like such... 

     

    SortByColumns(Search(AddColumns(Report_1, "ToolValue", Tool.Value), 
    txtSearch_1.Text,
     "TechNumber", "ToolValue"),
     "Date",
     Descending
    );
    Filter(Table, isBlank(toDateComponent.SelectedDate) || date <= toDateComponent.SelectedDate, isBlank(fromDateComponent.SelectedDate) || date >= fromDateComponent.SelectedDate)

     

    How do I combine the two functions and have them both work?

    Thank you

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @xwingnutx,

     

    As @AlexBakerWong correctly stated, you will need a filter() statement to reach that goal.

    However, you should always enclose / combine your query statements, not write them after one another.

     

    In your case this would leave you with the following code:

    SortByColumns(
     Search(
     AddColumns(
     Filter(Report_1, 
     isBlank(DatePickerTODATE.SelectedDate) || Date <= DatePickerTODATE.SelectedDate, 
     isBlank(DatePickerFROMDATE.SelectedDate) || Date >= DatePickerFROMDATE.SelectedDate
     ),
     "ToolValue", 
     Tool.Value
     ), 
     txtSearch_1.Text, 
     "TechNumber", 
     "ToolValue"
     ),
     "Date",
     Descending
    );

     

    Please adjust the names of DatePickerTODATE and DatePickerFROMDATE to the correct names.

     

    I hope this helps!

  • xwingnutx Profile Picture
    10 on at

    Hi @LaurensM and thank you for your help.

    I tried the code as you supplied after changing the DatePicker names and I'm getting the error "isBlank is an unknown or unsupported function". 

    xwingnutx_2-1673379241545.png

     

     

  • LaurensM Profile Picture
    12,516 Moderator on at

    @xwingnutx,

     

    My apologies, I clearly missed that.

    It should be IsBlank (I and B are both capital letters). Currently the i is in lower case.

  • xwingnutx Profile Picture
    10 on at

    Works like a charm. 

    Thank you so much!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard