Sep 13 2023 05:31 AM
Sep 13 2023 05:31 AM
Hello all, I am currently designing a visitor sign in kiosk where it shows if the visitor is expected for a meeting at my company and allows them to sign in. Currently I'm using 2 or 3 collection to 1) get all calendar events , 2)get only todays events , 3) get attendee names and filter hourly. This works perfectly fine but there problem is theres going to be way more data so every time the collection is formed the user is waiting a long time until the sign in gallery the collection is connected to loads. Is there a function that will only display todays events? I'm trying to not have to do any filtering within powerapps to help speed up run times. I'm open to other solutions (sharepoint etc) please let me know! Thank you
Sep 14 2023 01:45 AM
The best approach for this is to use the Filter function directly within your data source connection. You can set the Items property of your calendar display to filter the events based on today's date using the following formula:
Filter(YourCalendarDataSource, Start >= Today() && Start < DateAdd(Today(), 1))
Replace `YourCalendarDataSource` with the name of your Outlook calendar data source. This formula should display only today's events and should help improve app performance by reducing the additional collections or filtering steps in PowerApps.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Sep 14 2023 07:31 AM
Hi @flowadm20000 ,
If you are using events that are stored in a list or in dataverse, then you can speed things up if you create a new string column as a quick "index" in your database.
On item save write just a date string (like "09/14/2023") into that column.
If you want to filter hourly, add another text field and fill it like "09/14/2023 10:00" for all entries between 10:00 and 11:00
Then just filter for that string value. Filtering for string equality should directly be delegated to the database and should be much faster than calculating dates while querying.
If you are trying to access events from an exchange calendar then you can use this command.
Office365Outlook.GetEventsCalendarView( LookUp(Office365Outlook.CalendarGetTables().value;DisplayName="MyCalendarName").Name; "2023-07-03T00:00:00.000Z"; "2023-07-03T23:59:00.000Z" ).Values