web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Specify the calendar i...
Power Apps
Answered

Specify the calendar issue

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I create a calendar screen template in canvas apps, and I specify the calendar based on the steps, but it does not work.

 

This is the steps I followed:

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/screen-templates/calendar-screen-overview#specify-the-calendar

 

and the issue 

EvelynJiangJie_0-1666064653354.png

 

Why does it not work? 

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try:

    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 );
    Set( _myCalendar, 
     LookUp(Office365Outlook.CalendarGetTablesV2().value, name = "Calendar" )
    );
    Set( _minDate, 
     DateAdd( _firstDayOfMonth, -( Weekday(_firstDayOfMonth) - 2 + 1 ), Days )
    );
    Set( _maxDate, 
     DateAdd(
     DateAdd( _firstDayOfMonth, -( Weekday(_firstDayOfMonth) - 2 + 1 ), Days ),
     40, 
     Days 
     )
    );
    ClearCollect( MyCalendarEvents, 
    Office365Outlook.GetEventsCalendarViewV3(_myCalendar.name, 
     Text( _minDate, UTC),
     Text( _maxDate, UTC)
    ).value
    );
    Set( _calendarVisible, true )

     

    vbofengmsft_0-1666071557830.png

     

    Best Regards,

    Bof

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-bofeng-msft ,

     

    Thank you very much for your solution, it is helpful. But I met another issue:

     

    From my side, the app works well, the following code is what I used in my app. This code will help me call my agenda. However, when I shared the app with other users, other users showed the following error and could not call their calendar.

    EvelynJiangJie_1-1666249824773.png

     

    An error occurs when another user is using it

    EvelynJiangJie_0-1666249725170.png

     

    How should I fix the issue? Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard