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

Calendar view of events in PowerApps

Hey everyone!

 

Is there some way to get a calendar of view of events or tasks in PowerApps?

 

For example,consider a Sharepoint list of holidays. Can these holidays be seen on a calendar in the connected app? 

17 REPLIES 17
Meneghino
Level 10

Re: Calendar view of events in PowerApps

Mod_admin
Level: Powered On

Re: Calendar view of events in PowerApps

Hi @Meneghino,

 

In the blog you referred to, the holiday dates are updated through the app only. I want the dates to be automaticallu updated from a sharepoint list.Screenshot (14).png

Meneghino
Level 10

Re: Calendar view of events in PowerApps

Hi @Mod_admin

You need to use the SharePoint list as a data source for your gallery data.

There is no "automatic update" needed in PowerApps, just connect to the live data.

If the data is changed and you need to refresh the display, you can use the Refresh function.

Community Support Team
Community Support Team

Re: Calendar view of events in PowerApps

Hi @Mod_admin,

 

Like @Meneghino mentioned, if you updated the calendar in SharePoint online and you want the app to show the update of the calendar, there are a few ways to do that:

1. Your data connection will be refreshed on App Open.

2. You may also manually refresh using the Data Sources area (click on the three dots and select "refresh").

3. You can force the data to refresh by using the Refresh function.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
memsim1010
Level: Powered On

Re: Calendar view of events in PowerApps

Hello @Meneghino,

 

I have the same question as @Mod_admin.  I used the article you referenced and I would like my calendar app to show items from a SharePoint calendar.  I am unsure how to update the portion referring to the Holiday list and instead have it pull from my SharePoint calendar list.  Can you give me a quick hint how to change the last portion of the UpdateContext so that it would pull in events from a SharePoint list?  

Meneghino
Level 10

Re: Calendar view of events in PowerApps

Hi @memsim1010  the quick hint is to use your SP calendar as a data source.

The devil is probably in the details, though.

memsim1010
Level: Powered On

Re: Calendar view of events in PowerApps

@Meneghino Indeed it is.  I have been able to get the app connected to my SP Calendar List but if I use it as the data source in the CalendarGallery, It only shows the events.  I want all the dates in the month and the Visible function of the of what I named 'ReservedCircle' to indicate if there is an event on that day.  I had this working by editing the OnVisible of Screen1 to be:

 

If(!_initialized,
UpdateContext({_today:Today()});
UpdateContext({_firstDayOfMonthSmiley Very HappyateAdd(_today,1-Day(_today),Days)});
UpdateContext({_firstDayInViewSmiley Very HappyateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth)-2,7)+1),Days)});
ClearCollect(Collection1,'My Calendar List',{ReservedDate: Text(EventStart.Text), Title:Text(Title.Text)})
UpdateContext({_initialized:true})
)

 

And the Visble value of ReservedCircle is: 

DateAdd(_firstDayInView,ThisItem.Value,Days) in EventStart.Text

 

However, this only works for the first event in the list.  It doesn't hightlight all of the days that have an event and it doesn't hightlight the first event if it spans more than one day.  I was going to solve for this by tweaking the code slightly, similarly to the OnSelect formula in the TextDay box.  So, I'm stuck...

Meneghino
Level 10

Re: Calendar view of events in PowerApps

I think you need to create a collection (or upload a list of dates) for all the days of all possible years.  This is easy.

You then also upload the events from the calendar into a collection (to improve performance).

You then use the PowerApps shaping formulas to get what you want.

Happy to guide you through this in remote, will send contact details via private message.

Ekaterina_N
Level: Powered On

Re: Calendar view of events in PowerApps

Hello,

 

Maybe you can help me too: I cannot highlight events which last more then one day. I mean if event starts 03/27/2018 and end 03/30/2018, the calendar display "circle" only for 03/27/2018.

I use the same formulas as in the post above.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 140 members 3,815 guests
Please welcome our newest community members: