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 / Help with Date picker ...
Power Apps
Answered

Help with Date picker and text search box formula

(0) ShareShare
ReportReport
Posted on by 20

Hi, 

 

I need to be able to search across 3 columns and filter by two date boxes. 

nb02187_0-1711370295389.png

This is what I have so far.

Search('Score Shipments_1',TextInput1.Text,"BodyNumber","Packing_List_Number","field_4")

 

 

Categories:
I have the same question (0)
  • Verified answer
    Micky Profile Picture
    365 Moderator on at

    User Filter() instead of Search(), so you can have multiple search fields also, if you use Search, you can't use logic expression like getting the date range.

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

    @nb02187,

     

    @MMPoweR is correct. Filter will allow you to mimic the search functionality whilst also allowing you to add the DatePicker filters - within one function.

     

    Filter(
     'Score Shipments_1',
     //Adjust the column names accordingly
     TextInput1.Text in 'Body Number' || TextInput1.Text in 'Packing_List_Number' || TextInput1.Text in 'field_4',
     IsBlank(StartDatePicker.SelectedDate) || DateField >= StartDatePicker.SelectedDate,
     IsBlank(EndDatePicker.SelectedDate) || DateField <= EndDatePicker.SelectedDate
    )

     

    Please note that you will have to adjust the datepicker control names and possibly the column names.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • nb02187 Profile Picture
    20 on at

    Thank you so much for your help! How would I go about making it so the latest record is at the top of the gallery?

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

    @nb02187,

     

    You can enclose the Filter with the Sort function:

    Sort(
     Filter(
     //Your code
     ),
     DateField,
     SortOrder.Descending
    )

     

    I hope this helps!

  • nb02187 Profile Picture
    20 on at

    I tried it out, but I think there is an issue with the name for my date column. I get the following error. 

    nb02187_0-1711388269263.png

     

  • LaurensM Profile Picture
    12,516 Moderator on at

    @nb02187,

     

    The Sort parameters are currently written in the Filter statement. Closing the filter function first, should resolve the issue.

     

    I hope this helps!

  • nb02187 Profile Picture
    20 on at

    Thank you for all your help! I screen shot was covering up part of the code where I have the sort parameters separated from the filter statement. Not sure if there is something else that I'm missing and that's why it's not working. 

    nb02187_0-1711450188460.png

     

  • LaurensM Profile Picture
    12,516 Moderator on at

    @nb02187,

     

    Could you remove the opening bracket before your IsBlank(dpEndDate.SelectedDate) function, that should solve the issue.

     

    I hope this helps!

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
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard