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 based on Datepi...
Power Apps
Unanswered

Filter based on Datepicker not working and no error as

(0) ShareShare
ReportReport
Posted on by 2

I am trying to use the below code to filter my data based on several field, in which I am selected From date and To date from date picker which i inserted, but it is not working , neither it is producing error, therefore cannot understand reason

 

Note :  I tried "DeliverFromDate_1.SelectedDate"   instead of   "DeliverFromDate_1.Value", but underlined red color, but when it is value, then it is not red.

 

Please advise correction of writing these types of code

 

 

 

Filter(
 colAllList,
 (
 Len(HoldModel.Value) = 0 ||
 HoldModel.Value in Model
 ) &&
 (
 Len(HoldSerial.Value) = 0 ||
 HoldSerial.Value in Serial
 ) &&
 (
 Len(HoldCustomer.Value) = 0 ||
 HoldCustomer.Value in CustomerName
 ) &&
(
 Len(DeliverFromDate_1.Value) = 0 ||
 DeliverFromDate_1.Value >= DelDate
 
 ) &&
( Len(DeliverDateTo_1.Value) = 0 ||
 DeliverDateTo_1.Value < DelDate+1
 )


 )

 

 

 

My screen image  is as below for your fast reference

MIA27_0-1708538209916.png

 

My screen image of my table in teams of that field is as below for quick reference

MIA27_0-1708538497823.png

 

 

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @MIA27 , Can you use IsBlank function?

     

     

    (
     IsBlank(DeliverFromDate_1.SelectedDate)||
     DeliverFromDate_1.SelectedDate >= DelDate
     
     ) &&
    ( IsBlank(DeliverDateTo_1.SelectedDate) ||
     DeliverDateTo_1.SelectedDate< DelDate+1
     )

     

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @MIA27 , I also suggest to check Power Apps Filter A Gallery By Date Range Examples

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • MIA27 Profile Picture
    2 on at

    Dear ANB,

     

    the code does not work, it under line with red color, please advise

     

    MIA27_0-1708539996432.png

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    @MIA27 It would be good if you can share the screenshot of error message. Try to hover on red line which will give you the error message.

     

    Also, share what are the columns in the collection.

     

    Thanks,

    ANB

  • MIA27 Profile Picture
    2 on at

    Below is the image of error description, regarding the column, pls refer to my first post where I pasted the image of date field in the table showing the format of the field 

     

    MIA27_0-1708540397923.png

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    @MIA27 : Are these DeliverFromDate_1 and DeliverDateTo_1  data picker control? If not then please help me with the control type.

     

    Thanks,

    ANB

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @MIA27 , Even if you use Modern data picker or classic date picker, both has .SelectedDate property. So please make sure that you are using Date Picker. From screenshot it look like date picker but could you confirm once.

     

     

    Thanks,

    ANB

  • MIA27 Profile Picture
    2 on at

    Below pls find the screen shot of both the date picker picker and my screen shot of development, where the field on the can be seen for the selection

     

     

    MIA27_0-1708541225065.png

     

     

    MIA27_1-1708541256216.png

     

    MIA27_2-1708541330683.png

     

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    @MIA27 This date picker is from Microsoft Teams canvas app and the controls in Microsoft Team Canvas app is different from normal canvas app. 

    Microsoft Teams Canvas app Date Picker Normal canvas app modern Date Picker
    ANB_0-1708541848080.png

     

    ANB_1-1708541878656.png

     

     

    Now, please help me below:

    Are you creating a canvas app in Microsoft Teams?

    Or you have copied the date picker control from Microsoft Teams canvas and pasted into normal canvas app?

     

    NOTE: You should mention these things in your first post.

     

    Thanks,

    ANB

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

     

    @MIA27 Please try this:

    (
     IsBlank(DeliverFromDate_1)||
     DeliverFromDate_1.Value >= DelDate
     
     ) &&
    ( IsBlank(DeliverDateTo_1) ||
     DeliverDateTo_1.Value< DelDate+1
     )

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard