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

Community site session details

Session Id :
Power Apps - Building 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.

I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at
    Re: Filter sharepoint list by datepicker selected date or text search box
    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
    Re: Filter sharepoint list by datepicker selected date or text search box

    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
    Re: Filter sharepoint list by datepicker selected date or text search box
    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
    Re: Filter sharepoint list by datepicker selected date or text search box

    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
    Re: Filter sharepoint list by datepicker selected date or text search box

    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
    Re: Filter sharepoint list by datepicker selected date or text search box

    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
    Re: Filter sharepoint list by datepicker selected date or text search box

    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
    Re: Filter sharepoint list by datepicker selected date or text search box

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 766 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard