cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
systemcrash Advocate II
Advocate II

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 Advocate II
Advocate II

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 Advocate II
Advocate II

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 Helper V
Helper V

Re: Add Sharepoint Calendar to Calendar Screen

Could you share what you did?

I'm trying to do the same thing!

Thanks

systemcrash Advocate II
Advocate II

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 Community Champion
Community Champion

Re: Add Sharepoint Calendar to Calendar Screen

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

 

@TopShelf-MSFT

Anonymous
Not applicable

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
Regular Visitor

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 Advocate II
Advocate II

Re: Add Sharepoint Calendar to Calendar Screen

Hi,

 

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

 

 

BethHall
Frequent Visitor

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,696)