Hello PowerApp Gurus,
Hopefully this is a simple question for you.
I am trying to put together an app that helps to add task due date reminders to user's Outlook Calendars. My datasource is a sharepoint list, i am using 2 columns: Title, Due Date. My app pulls the list, allows users to select events with a checkbox, and then by clicking one button I want them to be able to add all selected to their calendar. I am able to schedule Outlook reminders for one event at a time. I did the setup where once user selects multiple events they want to add - they are added to a collection (EventCollection). I now need to loop through collection items for the scheduling. I am clearly missing something because instead of scheduling an event for each item, my code is scheduling multiple events (Oulook meetings) for one of the items. If I have item 1 and 2 selected – it schedules 2 meetings for item 2, if I have 1, 2, and 3 selected- it’ll be 3 meetings for event #3).
Can you please help me fix it?
ForAll(EventCollection,
Office365Outlook.V4CalendarPostItem(
LookUp(
Office365Outlook.CalendarGetTables().value,
DisplayName = "Calendar"
).Name,
EventTitle.Text,
DateAdd(DateTimeValue(
DataCardValue.SelectedDate &" "&"08:00AM"),
TimeZoneOffset(),
Minutes
),
DateAdd(
DateTimeValue(DataCardValue.SelectedDate &" "&"09:00AM"),
TimeZoneOffset(),Minutes
),
"(UTC) Coordinated Universal Time",
{
body: "This is an auto-scheduled reminder",
importance: "high",
reminderMinutesBeforeStart: 30,
isReminderOn: true,
showAs:"busy"
}
));