cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CMHants
Level: Powered On

Filter a gallery from a custom selection in the calendar screen

hi all,

 

I hacked the calendar screen in PowerApps to link it to a calendar format SharePoint list instead of an outlook calendar. The slight issue I'm getting is I cant filter a gallery to see the meetings for the selected day in the calendar screen.

 

I have a variable that captures selected date, I'm trying to filter the gallery like this - filter(AHC_Shared_Calendar, 'Start Time' = _DateSelected)

 

My problem is that my gallery just returns blank. I think the problem might be that the sharepoint list column is date time and the variable returns only a short date format.

 

can anyone advise

 

2 REPLIES 2
Super User
Super User

Re: Filter a gallery from a custom selection in the calendar screen

@CMHants 

I have two ideas to share with you:

 

#1  Dates cannot be delegated in SharePoint (yet) so if you have over 500 dates in the calendar trying bumping the limit up to 2000 in the advanced settings and seeing what happens.

 

#2  How did you set the variable _DateSelected?  What does it look like in a text label?  My guess is it has the format 12/29/2019.  What about 'Start Time'?  What does it look like in a text label?  My guess is something like 12/29/2019 02:23:45PM.

 

You might be comparing a Date with a DateTime here.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Community Support Team
Community Support Team

Re: Filter a gallery from a custom selection in the calendar screen

Hi @CMHants ,

Do you mean that the SP List Calendar events could not be displayed within the CalendarEventGallery1?

 

Based on the needs that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. I agree with your thought almost, I think this issue is related to the filter condition within your Filter function.

The 'Start Time' column would return a date time value in 12/4/2019 1:00 PM format, but the _dateSelected variable would only return a Date value in 12/4/2019 format.

 

Please consider take a try with the following workaround:

3.JPG

Set the Items property of the CalendarEventsGallery1 to following:

Filter(
       '20190321_Calendar', 
        Text('Start Time', DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)
)

On your side, please modify your formula as below:

Filter(
        AHC_Shared_Calendar, 
        Text('Start Time', DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)
)

Please consider take a try with above solution, then check if the issue is solved.

Note: Currently, the Date time column of a SP List could not be delegated within PowerApps app, so above formula may cause a Delegation warning issue. If the amount of your SP Calendar List records is not more than 2000, you could ignore this warning issue. Please make sure you have set the "Data row limits for Non-delegable queries" option within Advanced settings of App settings of your app to maximum value -- 2000.

 

Best regards,

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.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,800)