Skip to main content

Notifications

Community site session details

Community site session details

Session Id : uWELUhahvbmgLHXP4iYZGC
Power Apps - Building Power Apps
Unanswered

Outlook Calendar Missing events

Like (0) ShareShare
ReportReport
Posted on 28 Jul 2020 08:20:12 by

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 "

 
 
  • Community Power Platform Member Profile Picture
    on 29 Jul 2020 at 10:03:58
    Re: Outlook Calendar Missing events

    @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.

  • v-yutliu-msft Profile Picture
    on 29 Jul 2020 at 05:46:21
    Re: Outlook Calendar Missing events

    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started
Loading complete