cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frank_b
Regular Visitor

Using Date Pickers to Search/Filter My Gallery

Hello;

 

I would like to use Date Pickers to filter out results on my gallery. I would like to use two Date Pickers to tell the gallery what dates to start from and end on. What would be the best method to achieve this function?

 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Ramole
Resident Rockstar
Resident Rockstar

Hi @frank_b 

 

Please try this should work for you, let me know if you need any help 

 

Filter('Travel Request', 
      (Created >= dteStartDate.SelectedDate 
       Or IsBlank(dteStartDate.SelectedDate)
      )
      And
     (Created <  DateAdd(dteEndDate.SelectedDate, 1, Days) 
      Or IsBlank(dteEndDate.SelectedDate)
     )
)

 

Capturdatee.JPG

Capturdate3e.JPG

 

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

View solution in original post

9 REPLIES 9
Ramole
Resident Rockstar
Resident Rockstar

Hi @frank_b 

 

Please try this should work for you, let me know if you need any help 

 

Filter('Travel Request', 
      (Created >= dteStartDate.SelectedDate 
       Or IsBlank(dteStartDate.SelectedDate)
      )
      And
     (Created <  DateAdd(dteEndDate.SelectedDate, 1, Days) 
      Or IsBlank(dteEndDate.SelectedDate)
     )
)

 

Capturdatee.JPG

Capturdate3e.JPG

 

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

View solution in original post

Ramole
Resident Rockstar
Resident Rockstar

@frank_b 

 

Is it resolved now ?

if yes  please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."
frank_b
Regular Visitor

Thanks, Ramole! 

 

Just to clarify, "Travel Request" is the name of the data table, "Created" is the name of the column, and "dteStartDate" is the name of the datepicker, correct?

 

Also, is there a way to use more date pickers with a data table containing two columns of dates; i.e., using two more date pickers to filter out a different column of dates different than ones used in the previous column? If you need more clarification, please let me know.

 

Thanks!

frank_b
Regular Visitor

Sorry I couldn't respond sooner; my internet was down and was off for the weekend.

Ramole
Resident Rockstar
Resident Rockstar

@frank_b 

"Travel Request"  goes to your data source 

dteStartDate =  your datePicker 

 

if you need to clarify just ask 

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."
frank_b
Regular Visitor

Thanks again for the command. However, I'm having problems with the second date picker; it's not filtering out results. Here's the command I put in:

 

Screenshot 2021-08-05 154543.png

Ramole
Resident Rockstar
Resident Rockstar

@frank_b 

 

What error are you get in ?

Tell me your date field names and control names 

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."
frank_b
Regular Visitor

It’s not showing any error messages, it’s just the second date picker is not functioning. ‘Assigned Date’ is the column I’m using and “PMR Action Items” is the share point list.

frank_b
Regular Visitor

@Ramole I got it fixed. Thanks!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,026)