cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Sharepoint Calendar in PowerApps - Filtering

I've created a calendar view using a SharePoint calendar in PowerApps. I based this off of this tutorial: https://www.youtube.com/watch?v=1rsyyYiI4sU&t=1168s

 

I can't seem to figure out how to get the dates that have passed to drop off the gallery view automatically. Any ideas?

 

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Sharepoint Calendar in PowerApps - Filtering

Hi @Anonymous,

 

Could you please share a bit more about your scenario?

Do you want to filter the items within the Gallery control and then remove the items (events) whose created date (or End date or Start date) is passed?

 

If you want to filter the items within the Gallery control and then remove the items (events) whose created date (or End date or Start date) is passed, I think the Filter function could achieve your needs.

 

I assume that you want to filter out the items (events) whose created date is less than current date, I have made a test on my side, please take a try with the following workaround:2.JPG

 

 

Set the Items property of the Gallery control to following formula:

SortByColumns(
Filter(
'20180806_CalendarList',
StartsWith(Title, TextSearchBox1.Text),
Created>=Today()
),
"Title", If(SortDescending1, Descending, Ascending)
)

If you want to filter out the items (events) whose Start date is less than current date, please type the following formula:

SortByColumns(
Filter(
'20180806_CalendarList',
StartsWith(Title, TextSearchBox1.Text),
EventDate>=Today()
),
"Title", If(SortDescending1, Descending, Ascending)
)

If you want to filter out the items (events) whose End date is less than current date, please type the following formula:

SortByColumns(
Filter(
'20180806_CalendarList',
StartsWith(Title, TextSearchBox1.Text),
EndDate>=Today()
),
"Title", If(SortDescending1, Descending, Ascending)
)

 

 

More details about the Filter function in PowerApps, please check the following article:

Filter function 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Sharepoint Calendar in PowerApps - Filtering

Thank you so very much. The following filter is exactly what I needed:

 

If you want to filter out the items (events) whose Start date is less than current date, please type the following formula:

SortByColumns(
Filter(
'20180806_CalendarList',
StartsWith(Title, TextSearchBox1.Text),
EventDate>=Today()
),
"Title", If(SortDescending1, Descending, Ascending)
)

 

Very grateful for your help!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,850)