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 :

New Office 365 Screen Templates

Audrie101 Profile Picture Posted by Audrie101 Microsoft Employee
@ArtsyPowerApper walks you through a few of her favorite features and functions in 6 brand new Office 365 Screen Templates!
 
Blog announcement with more details:
 
Office 365 Users Connector:
 
Office 365 Outlook Connector:

TrioTemplate.png

Categories:

Comments

  • Community Power Platform Member Profile Picture Community Power Pla... Microsoft Employee
    Posted at
    New Office 365 Screen Templates

    Hi Vivekb,

     

    This works perfectly.  Thanks so much.  Looks like Audrie also commented that this should be fixed in the template.

     

    Ed

  • ThatAPIGuy Profile Picture ThatAPIGuy 925
    Posted at
    New Office 365 Screen Templates

    @Anonymous 

     

    After further digging into this issue, I saw that all the events are created in my local time zone, however, the All-day events are created in UTC. 2018-11-01 10_50_56-App - PowerApps.png

    So, This is wha you need to do - 

    1. Create a separate collection -'MyCalendarEventsLocalTime' where we will add columns 'StartLocalTime' and 'EndLocalTime' to the MyCalendarEvents Collection

    2. Use the local time to count the number of events on that day and also to display the details of these events on the right.

     

    For the OnSelect property of the dropdownCalendarSelection2, we will use this formula - 

     

    /*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, dropdownCalendarSelection2.Selected); 
    Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days)); 
    Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days)); 
    ClearCollect(MyCalendarEventsNotLocal, Office365.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(_maxDate, UTC)).value); 
    ClearCollect(MyCalendarEventsLocalTime,AddColumns(MyCalendarEventsNotLocal,"StartTimeLocal", If(IsAllDay,DateAdd(Start,TimeZoneOffset(Start),Minutes),Start),"EndTimeLocal", If(IsAllDay,DateAdd(End,TimeZoneOffset(End),Minutes),End))); UpdateContext({_showLoading: false}); 
    Set(_calendarVisible, true)

    As you can see above I created two new columns and added the timezoneoffset minutes to the start and end time if it's an all day event (using the IsAllDay property ).

     

    Now that we have the time in local time zone for the all day events as well - we can modify the formula for

    1. the circle below the date - 'Circle2'

    /*Visible if calendar events are found on this day*/CountRows(
     Filter(
     MyCalendarEventsLocalTime, 
     DateValue(Text(StartTimeLocal)) = DateAdd(
     _firstDayInView,
     ThisItem.Value,
     Days
     )
     )
    ) > 0 && !Subcircle2.Visible && Title5.Visible

     2. for Event details on the right - 

    Set the Gallery items to - 

    /*Shows events only on selected date*/
    SortByColumns(Filter(MyCalendarEventsLocalTime, Text(StartTimeLocal, DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)), "Start")

    For Description2 - 

    If(ThisItem.IsAllDay,"All Day", DateDiff(ThisItem.Start, ThisItem.End, Minutes) & Lower(Left("Minute", 1)))

    and for Body2 -

    Text(ThisItem.StartTimeLocal, DateTimeFormat.ShortTime)

    Screenshot of how it looks after these changes - 2018-11-01 12_04_14-Calendar Template Modified for All day Events - PowerApps.png

     

     

     

    Also, attaching the files for the powerapp file.

     

    Hope this helps.

     

    @Audrie-MSFT I guess this is either a bug on the connector of if it's supposed to be this way, the screen template needs to be modified.

     

  • ThatAPIGuy Profile Picture ThatAPIGuy 925
    Posted at
    New Office 365 Screen Templates

    @Anonymous

     

    I just tried the same and I am getting the same error. It showed 8 PM on mine. I am guessing there is some issue with the time zone. as 8 PM Eastern means 12 midnight GMT. Need to do some tweaking around that. Will let you know once I figure it out.

     

    Good catch though!

  • Community Power Platform Member Profile Picture Community Power Pla... Microsoft Employee
    Posted at
    New Office 365 Screen Templates

    Hi Audrie,

     

    I think I found an issue with the Calendar template.  Everything seems to work at first glance, but if you look closer, any calendar entry that is set as "all day" shows on the day prior to the actual event.  For instance, "Columbus day" shows on the 7th of October instead of the 8th as it should.  This seems to be the case for any calendar (my personal calendar, the US Holiday calendar, etc).  Any event I put in Outlook as an "all day" event will show on the previous day.

     

    I have attached a screen shot to illustrate.

     

    How do we fix this.  I have tried a bunch of things but haven't come up with the correct universal solution.  Please advise.  Thanks.

     

    Ed

  • Community Power Platform Member Profile Picture Community Power Pla... Microsoft Employee
    Posted at
    New Office 365 Screen Templates
    Hi,
    Brilliant :). When it will be available in PowerApps environment? I’m asking because I don’t see it now.

    Regards
    Sebastian