Hi Community:
I've used Miscrosoft's OOTB Out of Office Power App template to customize and created an app for my office to use. I noticed that there is a little part that's mal-functioned and at the moment I can't seem to fix it. I am hoping someone could help shed a light.
On the Clear Conflict screen, the design is to show a collection of events during the time that user blocks as "out of office", by default all the events are selected, when unchecked, one unselects all, can select only one or a few of those events to clear. The problem is even when you unchecked the "all selection" then click to select a few of the events, by clicking the submit button, it will clear all events anyway, which defeats the purpose of clearing only selective events. The codes look right to me, but the result is not, therefore I am asking if anyone would know how to fix it.
Here are the test screenshots. As you can see, although I only selected one to clear, it still cleared all 3, and when going back to check OUTLOOK calendar, all 3 events on that day have been cleared, which was not what supposed to happen.
The codes on the "Select all conflicts" check box OnCheck:
UpdateIf(EventConflicts, true, {Remove: true});
Set(_clearAll, true)
and on the OnUncheck:
UpdateIf(EventConflicts, true, {Remove: false})
The code on the ConflictsGallery individual item OnSelect:
Select(Parent);
The code on the "Clear x conflicts" button OnSelect:
Concurrent(
//clears all selected events from calendar
ForAll(EventConflicts, Office365.CalendarDeleteItem(_myCalendarID, Id)),
Set(_clearedEventsCount, CountRows(EventConflicts)));
Navigate(SuccessScreen, BorderStyle.None, {_sendingInvite: false});
//Clears the ClearedEvents collection and refreshes the FutureCalendarEvents collection
Clear(EventConflicts);
ClearCollect(FutureCalendarEvents, Office365.GetEventsCalendarViewV2(_myCalendarID, Text(Now(), DateTimeFormat.UTC), Text(DateAdd(Now(), 90, TimeUnit.Days))).value)
Any help would be greatly apprecaited.
S