Hello guys,
I need a help, I have a gallery with all this data shown in tables. However, I need to filter this data between two dates (DatePicker1 and DatePicker2) in this gallery.
I can filter the gallery in just one DatePicker, but I can not use the 2 to range.
Could someone help me in the code?
Follow the image to demonstrate how the application layout is.
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
Do you want to filter a data table according to two date pickers?
I made a similar test as follows:
Create a data table(shows two items:student,modified on),two date pickers named date picker1 and date picker2
Set the data tale’s items:
Filter( students, DateValue(Text(modifiedon,"[$-en- US]mm/dd/yyyy")) >=DateValue(Text(DatePicker1.SelectedDate,"[$-en-US]mm/dd/yyyy")) &&DateTimeValue(Text(modifiedon,"[$-en-US]mm/dd/yyyy")) <=DateValue(Text(DatePicker2.SelectedDate,"[$-en-US]mm/dd/yyyy")) )
After these practices,the items that the data table shows will be filter according to two date piackers.
Best regards,
Community Support Team _ Phoebe Liu
Hi @Anonymous ,
Do you want to filter a data table according to two date pickers?
I made a similar test as follows:
Create a data table(shows two items:student,modified on),two date pickers named date picker1 and date picker2
Set the data tale’s items:
Filter( students, DateValue(Text(modifiedon,"[$-en- US]mm/dd/yyyy")) >=DateValue(Text(DatePicker1.SelectedDate,"[$-en-US]mm/dd/yyyy")) &&DateTimeValue(Text(modifiedon,"[$-en-US]mm/dd/yyyy")) <=DateValue(Text(DatePicker2.SelectedDate,"[$-en-US]mm/dd/yyyy")) )
After these practices,the items that the data table shows will be filter according to two date piackers.
Best regards,
Community Support Team _ Phoebe Liu
Hi @v-yutliu-msft,
What is the "modifiedon" in this case?
DateValue(Text(modifiedon,"[$-en- US]mm/dd/yyyy"))
I'm trying to use the filter function, but maybe it's not working because i'm using SP list..
Best regards,
Hi @Anonymous ,
Firstly,the "modifiedon" is one filed’s name of my data source,just use for testing,you should replace this with your field’s name.
Secondly,if the waring of delegation shows,the data that is dealed with locally will be limited(default500).
The data type of datetime whose data source is SP list used in the function of filter isn't delegable.
Here is the doc for your reference:
https://docs.microsoft.com/en-us/connectors/sharepointonline/
Best regards,
Community Support Team _ Phoebe Liu
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
172 | |
62 | |
32 | |
31 |
User | Count |
---|---|
338 | |
270 | |
105 | |
71 | |
56 |