cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
UC3378
Helper III
Helper III

sharepoint events do not translate correctly over to powerapps

My powerapps is connected to a sharepoint calendar.  When i create an event in sharepoint that spans two days, it shows up as only one day in powerapps. For example, in sharepoint i created an event from 1PM day 5 to 1PM day 6.  But in powerapps, it only shows up in day 5 and shows 1PM - 1PM.   Any help is appreciated.  Thanks.  

1 ACCEPTED SOLUTION

Accepted Solutions
RoryL
Community Support
Community Support

 

Hi UC3378,

 

Thank you for your reply and the additional details, this helps. I understand that the data in Power Apps is showing as one day for an event created in a SharePoint calendar which spans multiple days.

 

A single event in a SharePoint calendar, although spanning multiple days, would create one list entry in SharePoint which appears to be represented the same way in the Power Apps collection data as well.

 

Do the times and dates (i.e. start time and end time) align the same in the collection when compared to what is in SharePoint? If so, where in Power Apps does it show the wrong dates and times when compared with SharePoint? Are you using a calendar control, or how is this data displayed in the app when it shows incorrectly? This information will help me better understand our next steps to resolve the problem.

 

Thanks again!

Rory

View solution in original post

7 REPLIES 7
RoryL
Community Support
Community Support

 

Hi UC3378

 

Thank you for your post to the community. I would suggest to review the “Time Interval” configuration in the Calendar view in SharePoint. Here you can specify the two columns used to place items in the calendar by start and end time. These should match the start and end time configuration used in the app.

 

I hope this helps! 

 

Thank you,

Rory

@RoryL,

 

Thanks for replying.  I will give it a try and let you know how it goes.   

@RoryL ,

 

In the my collection, the overlapping events of two days is stored as one record.  So I can see why it is only showing it on one day of the powerapps calendar instead of two days.  See below:

 

A record from sharepoint, that is stored in a collection.A record from sharepoint, that is stored in a collection.

 

So I guess the question is how can powerapps make it as two separate days?  And from your last post, you said it has something to do with the time interval in sharepoint.  This is where I am still stuck.  In sharepoint, it is showing correctly as two separate days.  So are you saying I have to make it where it is showing up as two separate days in sharepoint (at least in the data structure side), and if so I don't know where you make that happen.  

 

Here are my sharepoint site settings below:

 

sharepoint1.PNG

 

Thanks.

RoryL
Community Support
Community Support

 

Hi UC3378,

 

Thank you for your reply and the additional details, this helps. I understand that the data in Power Apps is showing as one day for an event created in a SharePoint calendar which spans multiple days.

 

A single event in a SharePoint calendar, although spanning multiple days, would create one list entry in SharePoint which appears to be represented the same way in the Power Apps collection data as well.

 

Do the times and dates (i.e. start time and end time) align the same in the collection when compared to what is in SharePoint? If so, where in Power Apps does it show the wrong dates and times when compared with SharePoint? Are you using a calendar control, or how is this data displayed in the app when it shows incorrectly? This information will help me better understand our next steps to resolve the problem.

 

Thanks again!

Rory

Hi @RoryL ,

 

You are right, the sharepoint calendar shows a multi day event as one list entry:

 

Exported my list entry from sharepointExported my list entry from sharepoint

 

This is how it shows in sharepoint calendar:

sharepoint calendarsharepoint calendar

 

The start and end times in the collection do seem to be the same as in sharepoint.  Here is my collection below:

My Collection in powereappsMy Collection in powereapps

 

And this is how it looks in my powerapps calendar.  This is a calendar template from powerapps that i converted to connecting to sharepoints.  

 

Powerapps calendar.  Tom Boston which is a two day event shows only on 27.Powerapps calendar. Tom Boston which is a two day event shows only on 27.

 

I think the problem is, I have a Gallery that shows these events in the PA calendar.  And this is the Items property of the Gallery:  Filter(TestCol, DateValue(Text('Start Time')) = DateAdd(_firstDayInView, ThisItem.Value, Days))

TestCol is the collection that holds all the sharepoint events.   I am showing events for records with Start Time that matches the each calendar date.  If it matches, it shows on that day.  

 

I tried the below but it ends up showing all the events on all the days:

Filter(TestCol, DateValue(Text('Start Time')) || DateValue(Text('EndTime'))= DateAdd(_firstDayInView, ThisItem.Value, Days))

 

Cal11.PNG

Thank you for your help!

 

 

 

@RoryL ,

 

I put this in the Gallery Items property and this worked:

 

Filter(TestCol, DateValue(Text('Start Time')) = DateAdd(_firstDayInView, ThisItem.Value, Days) || DateValue(Text('End Time')) = DateAdd(_firstDayInView, ThisItem.Value, Days))

 

Thank you so much for your help.  Wouldn't have gotten here if you didnt make me go through the steps you wanted me to look at.  I will accept this as a solution.  Mind if I ask you a different questions relating to the same app?

 

@RoryL ,

 

I think I have a bigger issue at hand then initially realized.  I'm hoping you can have some ideas to share with me.  So my initial problem was that if I created a multiday event, it only showed as one day in my PA calendar.  That was fixed with this code in the Gallery Items property.  

 

Filter(TestCol, DateValue(Text('Start Time')) = DateAdd(_firstDayInView, ThisItem.Value, Days) || DateValue(Text('End Time')) = DateAdd(_firstDayInView, ThisItem.Value, Days))

//TestCol being my collection that contains all the events from sharepoint calendar list. 

 

But I realized what if someone wants to have an event that stretches more then 2 days (3 days). 

 

event that spans 3 days.event that spans 3 days.

The above filter would only show the starting and the ending date on the calendar but not the days in between because the collection only shows start and end date:

 

A sample collection (does not include the events from above snippet)A sample collection (does not include the events from above snippet)

 

So I have to rethink how i can do this.  Work out the logic from the filtering of the gallery, or work it out in the collection to somehow show each day of an event as a separate record?  

 

Sharepoint is able to do this, despite the fact that they have the multiday event as one single record just like powerapps does:

Sharepoint is able to do thisSharepoint is able to do this

 

Would you know how sharepoint codes this?  Thanks

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,537)