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 / Filter sharepoint list...
Power Apps
Answered

Filter sharepoint list by datepicker selected date or text search box

(0) ShareShare
ReportReport
Posted on by 181

Hi all,

I have TextSearchBox and datepicker and I want to use them to filter the SharePoint list called YT CDR List.

Just filter by text search box is fine but filter by datepicker Selected date is not work.

 

Below is my code on Browse gallery's Items but not work;

SortByColumns(Filter([@'YT CDR List'],StartsWith('Upload Time', DatePicker2.SelectedDate) ||StartsWith('Project No.', TextSearchBox1.Text)||StartsWith(OA, TextSearchBox1.Text)||StartsWith(Commence, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

Screen Capture:

AT_AlanTse123_0-1660228398625.png

 

How can i revise the code that can search by datepicker selected date or TextSearchBox ?

 

Thank you very much for your help.

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at
    SortByColumns(
    	Filter(
    		[@'YT CDR List'],
    		'Upload Time' = DatePicker2.SelectedDate),
    		StartsWith('Project No.', TextSearchBox1.Text),
    		StartsWith(OA, TextSearchBox1.Text),
    		StartsWith(Commence, TextSearchBox1.Text)
    	), 
    	"Title", 
    	If(
    		SortDescending1, 
    		Descending, 
    		Ascending
    	)
    )

    Try that

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

  • AT_AlanTse123 Profile Picture
    181 on at

    Hi Nogueira,

     

    Thank you very much for your reply.

    I tried your code but it has the error.

    Would you please help to check?

    Thank you.

     

    AT_AlanTse123_0-1660266276731.png

     

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at
    SortByColumns(
    	Filter(
    		[@'YT CDR List'],
    		'Upload Time' = DatePicker2.SelectedDate,
    		StartsWith('Project No.', TextSearchBox1.Text),
    		StartsWith(OA, TextSearchBox1.Text),
    		StartsWith(Commence, TextSearchBox1.Text)
    	), 
    	"Title", 
    	If(
    		SortDescending1, 
    		Descending, 
    		Ascending
    	)
    )
  • AT_AlanTse123 Profile Picture
    181 on at

    Hi Nogueira,

    Thank you very much for your reply.

    Filter by date is work but it cannot filter by textsearchbox, Is it only can filter by one type in items property?

    Also, May I know if only filter by date, how to revise the code?

    Sorry for too much question.

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Filter by date:

    SortByColumns(
    	Filter(
    		[@'YT CDR List'],
    		'Upload Time' = DatePicker2.SelectedDate
    	), 
    	"Title", 
    	If(
    		SortDescending1, 
    		Descending, 
    		Ascending
    	)
    )

     

    Try this filter instead:

    SortByColumns(
    	Filter(
     Search([@'YT CDR List'];TextSearchBox1.Text;"Project No.";"OA";"Commence"),
    		'Upload Time' = DatePicker2.SelectedDate
    	), 
    	"Title", 
    	If(
    		SortDescending1, 
    		Descending, 
    		Ascending
    	)
    )

     

    Please chekc the name of the fields and the , and ;

  • AT_AlanTse123 Profile Picture
    181 on at

    Hi Nogueria,

    Filter by date is work, thank you very much for your help.

    But your second code is not work, i had change ; to :, it shows below error.

    AT_AlanTse123_0-1660296119354.png

    Thank you.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Itold you to check the names... It is not recognizing the "Porject No.".

     

    Check the suggestions when oyu type Project and use that value. The problem is the collumn

  • AT_AlanTse123 Profile Picture
    181 on at

    Ok, thank you very much for your help.

    I will check the name again.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard