cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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

11 REPLIES 11
systemcrash
Advocate II
Advocate II

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

Could you share what you did?

I'm trying to do the same thing!

Thanks

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

Anonymous
Not applicable

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

 

@Anonymous

Anonymous
Not applicable

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

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

Hi,

 

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

 

 

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

 

‼️  IMPORTANT NOTE ABOUT ALL LINKS: Since my original comment, I have retired the site that all this information is published on.  You can instead download from Dropbox here: 

https://www.dropbox.com/sh/cua7ljey4n4a7h9/AAA0qD-jn_gyqDJTo7U8OSQ_a?dl=0

 

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!

Tonyguk
Frequent Visitor

Hi @BethHall ,

 

I know this is an old thread but I was wondering if there was any other way to share your template as your hosting site seems to be down at the moment.

 

I'm in a position where I've a shared calendar(s) with pre filled all day slots (for desks so that we don't have a situation where folk attend the office with no desk available) and I'm struggling trying to make the default calendar template fit 🙂 

 

Thanks

Tony

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,673)