Hello All,
I created a calendar view in my app by adding a new calendar screen.
It was working perfectly since 2-3 months and suddenly it is missing may of the events. (Might be because i changed my windows password, but all are logged in with the new password).
Only sometimes it shows an error on my mobile device( I OS) that "Office 365 Outlook .Get Events Calendar View V2 Error: The GetEventsCalendarViewV2 method has an invalid value for calendarId parameter "
@v-yutliu-msft , Thanks for your reply.
I have made all the changes you suggested, however nothing changed as solution.
Please see the pictures attached there is still problem with Calendar ID.
Hi @Anonymous ,
Since "CalendarGetTables" this action has been deprecated, so this function may not work correctly in some device.
I suggest you use Get calendars (V2) instead.
To use this function, you need to make some changes in the template screen.
1)dropdownCalendarSelection1's Items:
Microsoft365Outlook.CalendarGetTablesV2().value
2) dropdownCalendarSelection1's OnSelect:
/*retrieves calendar events for all days in current month view and selected calendar
_minDate and _maxDate act as markers to prevent duplicate data collection*/
If(IsBlank(_userDomain),
UpdateContext({_showLoading: true});
Set(_userDomain, Right(User().Email, Len(User().Email) - Find("@", User().Email)));
Set(_dateSelected, Today());
Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))
);
Set(_calendarVisible, false);
UpdateContext({_showLoading: true});
Set(_myCalendar, Self.Selected);
Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days));
ClearCollect(MyCalendarEvents, Microsoft365Outlook.GetEventsCalendarViewV2(_myCalendar.id, Text(_minDate, UTC), Text(_maxDate, UTC)).value);
UpdateContext({_showLoading: false});
Set(_calendarVisible, true)
//Microsoft365Outlook.GetEventsCalendarViewV2(_myCalendar.id, Text(_minDate, UTC), Text(_maxDate, UTC))
3)iconPrevMonth1's OnSelect:
/*changes month view to previous month*/
Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, -1, Months));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days));
/*collects calendar events for all days in current month view. Updates _minDate to prevent duplicate data collection if user returns to this month view*/
If(_minDate > _firstDayOfMonth, Set(_minDate, _firstDayOfMonth); Collect(MyCalendarEvents, Microsoft365Outlook.GetEventsCalendarViewV2(_myCalendar.id, Text(_minDate, UTC), Text(_lastDayOfMonth, UTC)).value))
//Microsoft365Outlook.GetEventsCalendarViewV2(_myCalendar.id, Text(_minDate, UTC), Text(_lastDayOfMonth, UTC))
4)iconNextMonth1's OnSelect:
/*changes month view to next month*/
Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, 1, Months));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
/*collects calendar events for all days in current month view. Updates _maxDate to prevent duplicate data collection if user returns to this month view*/
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days));
If(_lastDayOfMonth > _maxDate, Set(_maxDate, _lastDayOfMonth); Collect(MyCalendarEvents, Microsoft365Outlook.GetEventsCalendarViewV2(_myCalendar.id, Text(_firstDayOfMonth, UTC), Text(_maxDate, UTC)).value))
//Microsoft365Outlook.GetEventsCalendarViewV2(_myCalendar.id, Text(_firstDayOfMonth, UTC), Text(_maxDate, UTC))
The result that Microsoft365Outlook.CalendarGetTablesV2().value returns is a table with these two fields:
id, name
The id represents calendarid.
The name represents calendar displayname.
While result that Microsoft365Outlook.CalendarGetTables.value returns is a table with these two fields:
name, displayname.
The name represents calendarid.
The displayname represents calendar displayname.
So you need to modify all the related functions.
Here's a doc about these two functions in details for your reference:
https://docs.microsoft.com/en-us/connectors/office365/
Best regards,
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional