web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard