cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
systemcrash
Level: Powered On

Add Sharepoint Calendar to Calendar Screen

The calendar screen is amazing.  By default, it show the 3 calendars

 

  1. Birthdays
  2. Personal calendar that is associated to the users account
  3. Holidays 

What I would need to do if I want to :

  1. discard those 3 personal calendar (no more dropdown) 
  2. Link the calandar screen to a sharepoint calendar List.

I'm aware that what i wanna do might not be possible since outlook dropdownlist represent calandar and the sharepoint calendar isn't really a calendar but a list of event... at least the way I understand it.

 

1 ACCEPTED SOLUTION

Accepted Solutions
systemcrash
Level: Powered On

Re: Add Sharepoint Calendar to Calendar Screen

Sorry for the late reply.

 

It's kind of long to explain.

 

If you haven't found it yet.  Instead of crawling for event in your Outlook Calendar.  you need to crawl all the event in your Sharepoint Calendar (that is basicly a list).  Ofc you will need to create a connection to that SP list.

 

Then, you change one line in the code on your calendarScreen.OnVisible

 

At somepoint you will see a clearcollect regarding "MyCalendarEvents".

 

You need to change to this : 
ClearCollect(MyCalendarEvents, Filter(
YourSPLCalendar,
EventDate >= _minDate && EndDate <= _maxDate
)

 

that code will make your calender form look into your SPL calendar instead your outlook.  

 

Other than that I hide the dropbox instead of completely deleting it since it was causing a lot of error.  

 

I know I could give you some more details, but let me know if you need some more help.

View solution in original post

8 REPLIES 8
systemcrash
Level: Powered On

Re: Add Sharepoint Calendar to Calendar Screen

I succesfully did what I wanted.  It wasn't that hard.  Minor changes on variables name and event and everything work as I want.

SylvieLet17
Level 8

Re: Add Sharepoint Calendar to Calendar Screen

Could you share what you did?

I'm trying to do the same thing!

Thanks

systemcrash
Level: Powered On

Re: Add Sharepoint Calendar to Calendar Screen

Sorry for the late reply.

 

It's kind of long to explain.

 

If you haven't found it yet.  Instead of crawling for event in your Outlook Calendar.  you need to crawl all the event in your Sharepoint Calendar (that is basicly a list).  Ofc you will need to create a connection to that SP list.

 

Then, you change one line in the code on your calendarScreen.OnVisible

 

At somepoint you will see a clearcollect regarding "MyCalendarEvents".

 

You need to change to this : 
ClearCollect(MyCalendarEvents, Filter(
YourSPLCalendar,
EventDate >= _minDate && EndDate <= _maxDate
)

 

that code will make your calender form look into your SPL calendar instead your outlook.  

 

Other than that I hide the dropbox instead of completely deleting it since it was causing a lot of error.  

 

I know I could give you some more details, but let me know if you need some more help.

View solution in original post

TopShelf-MSFT
Level 10

Re: Add Sharepoint Calendar to Calendar Screen

Thank you for posting this and sharing your process @systemcrash!

 

@TopShelf-MSFT

hugo7sep
Level: Power Up

Re: Add Sharepoint Calendar to Calendar Screen

Hi 

 

Hope ur doing well.

 

Im new at this and sometimes it is not that easy for me to understand.

 

You said I need to change the OnCalendarView, my question here is, What kind of screen are you using? the Calendar? or is the form Screen? (since this is a SP list?)

 

Tks

JohnMirando
Level: Powered On

Re: Add Sharepoint Calendar to Calendar Screen

@systemcrash- I am able to get my SharePoint calender list to show in galary control for my PowerApp. Where I am running into something I don't know how to handle is filtering what I show. I want to simply show what's happening Today(). I am using:

 

Filter(Events, Text('Start Time', DateTimeFormat.ShortDate) = Text(Today(), DateTimeFormat.ShortDate))

 

What is happening  seems to be time zone related (where my tenant is vs device). So for an event which starts as 4AM my time Eastern), it's not showing since on the calendar, even though  it shows starting at UK time in the app and subsequently drops those events off....

 

Any thoughts on how to handle that?

systemcrash
Level: Powered On

Re: Add Sharepoint Calendar to Calendar Screen

Hi,

 

Did look about your filter and I think that you need add/use TimeZoneOffset()

 

 

Highlighted
BethHall
Level: Powered On

Re: Add Sharepoint Calendar to Calendar Screen

@JohnMirando It sounds like you're experiencing some of the same issues I ran into recently.

There is an inconsistency with how SharePoint handles the data for "All Day" events vs. ones with specific start & end times (scheduled events). The data for these 2 types of events is handled differently, but stored in the same field.  This wouldn't be an issue if Power Apps had access to the  "All Day" checkbox field--but we don't.  All this results in an issue that is both difficult to identify & difficult to fix.  

The issue in a nutshell is that All-Day events are anchored to the timezone the user is in and Scheduled events are anchored to the timezone the event is in.  So you need to use the TimeZoneOffset function when handling All-Day items--but this screws-up scheduled events, which need standard date/time functions.  So formulas require some If/Than statements to identify and handle all day events with one formula, and scheduled events with a different one.

It took me a week to figure it all out 😭 enough to fix it for a calendar consolidation app template I'm giving away to the community. 

I wrote a very detailed blog post outlining the issue and the code I used to resolve it, step-by-step. Those details may help you resolve your issue as well.

Detailed blog post outlining issue:  https://straightenthemaze.com/intranets/technical-intranet/sharepoint/the-issue-with-powerapps-and-s...

I hope this helps!

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,083)