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?
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.
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.
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
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?
Hi @memsim1010 the quick hint is to use your SP calendar as a data source.
The devil is probably in the details, though.
@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({_firstDayOfMonth:DateAdd(_today,1-Day(_today),Days)}); UpdateContext({_firstDayInView:DateAdd(_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...
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.
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.
User | Count |
---|---|
207 | |
92 | |
84 | |
49 | |
41 |
User | Count |
---|---|
254 | |
104 | |
103 | |
61 | |
59 |