Recreating Recurring Events in Power Apps for SharePoint

preview_player
Показать описание
This is my first video on recreating the recurring calendar events in Power Apps that came from Classic SharePoint. The video nails down recurring days and weeks, but there is still more to do with a recurring month list item.

Collect MyNumbers:
ClearCollect(NumberCollection,["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"])

Collect without Switch:
Clear(Collection1);
ForAll(
FirstN(
NumberCollection,
Value(TextInput2.Text)
),
Collect(
Collection1,
{
Title: txtTitle.Text,
StartDate: dteStartDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text),
EndDate: dteEndDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text)
}
)
)

Entire Collect for Days, Weeks, Months:
Clear(Collection1);
Switch(
drpDateType.Selected.Value,
"Days",
ForAll(
FirstN(
NumberCollection,
Value(TextInput2.Text)
),
Collect(
Collection1,
{
Title: txtTitle.Text,
StartDate: dteStartDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text),
EndDate: dteEndDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text)
}
)
),
"Weeks",
ForAll(
FirstN(
NumberCollection,
Value(TextInput2.Text)
),
Collect(
Collection1,
{
Title: txtTitle.Text,
StartDate: dteStartDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text) * 7,
EndDate: dteEndDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text) * 7
}
)
),
"Months",
ForAll(
FirstN(
NumberCollection,
Value(TextInput2.Text)
),
Collect(
Collection1,
{
Title: txtTitle.Text,
StartDate: dteStartDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text) * 31,
EndDate: dteEndDate.SelectedDate + ThisRecord.Value * Value(txtDays.Text) * 31
}
)
)
)

Chapters:
0:00 Introduction
0:35 Power App Conference Orlando
2:10 Classic SharePoint Calendar
3:40 Power Apps Recreating Recurrence
4:30 Hardit Bhatia's Collect item multiple times in a collection
5:18 Collect My Numbers and My Days
7:40 Collect My Date
9:58 Creating Start Date and End Date
10:45 Fixing CollectNumbers adding a 0
12:45 Create a Modern Calendar in SharePoint
14:15 Connect PowerApps to the Calendar in SharePoint
16:33 Back to our Patch Statement
18:00 Adding Weekly & Monthly
18:55 Switch Days, Weeks, Months
21:52 Demonstration
23:07 Conclusion
Рекомендации по теме
Комментарии
Автор

Someone wrote a comment about using a different formula and deleted it. Never worry about correcting me, I don't mind and would love to share with the community. I am not always right! 😀

andrewhess
Автор

Andrew! Thank you so much for doing a video on this. I have spent days trying to work this out. You mentioned you may do another video on the different features of the recurring function, you'll have a fan here if you do 😉 An example of how I am looking to use this feature - I have monthly reports due on the second/third Fridays of each month. Cheers legend!

SPGruebner
Автор

Hey man, you are amazing! I'm really grateful! <Thanks>

jwnin
Автор

Hi Andrew, now you even provide the code in the video description? Excellent. Invaluable. Thx!

victordauden
Автор

Thank you for this video. How are you factoring in some months having 30 days, 31 days etc?

markdelbiondi
Автор

Thank you for this video. I was inspired by MP Coetzee's commentary to simplify the function and also add the hours and minutes
ForAll(

Sequence(
Value(TextInput2.Text);
0;
Switch(
drpDateType.Selected.Value;
"Jours";
Value(txtDays.Text);
"Semaines";
Value(txtDays.Text) * 7;
"Mois";
Value(txtDays.Text) * 31
)
);
Collect(
ColRecurrentRDV;
{
Title: DataCardValue2.Text;
TypeRDV: DataCardValue9.Selected.Name;
StartDate: DateValue1.SelectedDate + ThisRecord.Value + 0);
EndDate: DateValue2.SelectedDate + ThisRecord.Value + 0)
}
)
)

Jean-YvesClaes
Автор

I would love to add this directly into the "New Item" form in SharePoint List. Also would like add Employee Name.

ScottBrown
Автор

Andrew just a suggestion, why don't you use the sequence function instead of collecting the numbers each time, and set the amount of sequence steps to the reoccurrence variable, other than that, thanks for the video it gave me an idea how to solve my reoccurrence problem. Keep this vids rolling

mpcoetzee
Автор

Hey man! I hope to meet you in person at the conference! 😀👍👍

PowerAppsTutorial
Автор

I would love a way to add those M-F checkbox options or make the monthly meeting requests not just be on 30 day intervals. Can you help with that? Also, I need to prevent double bookings in Flow and somehow allow the users to cancel their event occurrence in the SP calendar list view.

Okieestatesgroup
Автор

When using this solution with the modern sharepoint events web part, and setting the Date Range to display upcoming events for any of the optional periods, do the recurrences come through?

At the moment, using the classic app, the recurrences are not recognised as upcoming so dont appear in the events web part. It only recognises the initial event date.

foxfox
Автор

You skipped quickly through choosing the gallery option and linking the "connection1". My gallery isnt finding any collections.

CourtneyRice-viwd
Автор

So I'm not seeing the NumberCollection show up when I create my gallery. My only options for Select a data source is Tables and Connectors dropbox. In your app is not there.

adamgrine
Автор

I would love to use such a simple solution, but the migraine/despair comes when folks need to edit or delete a recurring event. 😫 (Calendar updated by dozens and edited/viewed by hundreds of users.) I created a custom PowerApp form, which saves the initial instance of the recurring event, with a field for each recurrence variable ( # of recurrences, frequency, end, etc.). The list item creation triggers a Power Automate flow that calculates and creates the recurrences and adds, in a column called parentID, the ID of the initial instance so that if/when the recurring event is edited or deleted, a flow triggers that gets all event items with that parentID and updates everything accordingly. My brain hurts...

Northonicus
Автор

I'm sorry to come here with my stupid question... But when you added the gallery and deleted the picture, what did you do after, because if I delete the picture, then I see nothing in my gallery. I am stupid and very new to Power Apps, but I want to make this work and I am stuck. Thanks in advance!

booboo
Автор

Hi so we are using the old style Calendar and then using the events in new SharePoint syncing from Calendar to events but the only ones that dont work are the recurring can this be fixed so that the events calendar will show them ?

andrewfletcher
Автор

My team currently utilizes a media publication schedule (I think it's essentially an events list that the creator gave this name, but it allows us to add things like categorizing the type of communication, start/end dates and times, description, etc.) in SharePoint. Is there a way to use what you showed here to work with this type of list so that we can make certain events recurring as needed?

pmpope
visit shbcf.ru