Hi everyone,
I'm creating a dashboard for the receptionists to see where everyone is at that moment (about 20 staff).
Because it takes PowerApps quite a while to pull down all of the calendar events, I want to collect them i nthe background every 15 mins using an invisible timer control.
I can pull a list of calendars OK using
ClearCollect(colCalendarsList,
Office365Outlook.CalendarGetTablesV2().value
);
which results in a collection with the following columns - "id", "name"
id is the unique id of the calendar, name is the person's name who has shared a calendar with me.
I can also collect all events from all calendars shared with me using:
Clear(colALLCALENDAREVENTS);
ForAll(Distinct(colCalendarsList,id),
Collect(colALLCALENDAREVENTS,
Office365Outlook.GetEventsCalendarViewV3(
ThisRecord.Result,
Text(DateTimeValue("2023-02-28 01:00:00"),DateTimeFormat.UTC),
Text(DateTimeValue("2023-02-28 23:00:00"),DateTimeFormat.UTC)
).value
))
This creates a collection containing every attribute of each calendar event.
The problem is that there is no way to know which calendar each event was collected from. The result is that I can filter by "organizer" || "requiredattendees" but using this method often pulls the same event from several calendars, so I get duplication times the quantity of staff invited.
How can I attribute the "id" from the colCalendarsList collection to each calendar event in the colALLCALENDAREVENTS collection so that I can see which calendar each event was collected from and more easily filter the events?
Many thanks for any and all suggestions!

Report
All responses (
Answers (