I can't seem to figure out how to add a datepicker and be able to filter my gallery by the selected date.
I have a sharepoint list, where all my information is stored and have a column called "date".
I have the following formula in Items (from my gallery):
Filter ("my sharepoint list name", Date=DatePicker1.SelectedDate)
But for some reason it's not working.
Please let me know what I'm doing wrong.
Thanks,
Janette
Solved! Go to Solution.
Try just using the following. Since you are doing a range I don't think you will have the problem that this thread was about.
Filter('Perimeter Issues', Building = Dropdown1.Selected.Result, Date >= DatePicker1.SelectedDate && Date <= DatePicker2.SelectedDate)
This is of course assuming that your Datetime column is called Date. I would normally suggest a name for the column that isn't a reserved word.
Sorry, the comma in there was a typo
Filter('Perimeter Issues', Building = Dropdown1.Selected.Result && Date >= DatePicker1.SelectedDate && Date <= DatePicker2.SelectedDate)
Hi,
That didn't to bring up any results.
My column name is Date and has been set to Date and Time.
I've been doing some addtional searching and have come up with this solution. Bit more formula involved but it does seem to work, not sure how but does???
Filter('Perimeter Issues',DateValue(Text(Date),"en-GB")>=DateValue(Text(DatePicker1.SelectedDate),"en-GB") && DateValue(Text(Date),"en-GB")<= DateValue(Text(DatePicker2.SelectedDate),"en-GB"))
Just working on to put it Decending order now
Thanks for your assitance
As I said, in your case you really don't need the DateValue(Text()) functions. If you can get it to work that way fine. But it isn't necessary. There is something else going on if it doesn't throw an error, but doesn't bring up any records.
Hi,
I agree it does seem to be a bit lomg winded for what should be a simple solution.
Have you any ideas what could be the stumbling block?
try removing the building = dropdown from the Filter and see if you can get the date ranges working. Then you can see about adding it back in.
Filter('Perimeter Issues', Date >= DatePicker1.SelectedDate && Date <= DatePicker2.SelectedDate)
No still no luck retrieving data
I'm not sure what to tell you. That exact syntax works for me. As I said, I would use a different column name than 'Date'. Other than that I'm not sure what to suggest.
Hi,
I know SP sometimes acts funny if elements have been changed.
What I will try is create a new SP list and label the columns different and see if that works
Thanks for all you assistance
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
69 | |
49 | |
46 | |
19 |
User | Count |
---|---|
249 | |
126 | |
84 | |
75 | |
74 |