
Hi,
I am creating a SharePoint calendar that tracks events submitted through a Power App. The event data is stored in a SharePoint list and then that event is put on a SharePoint calendar. Is there a way in Power Apps that would exclude dates/times that are already taken/occupied in the calendar so people who submit events after a date is taken can't select that date? I currently have the Power App set up where the date and time are just pickers in the App.
Would I need to set up a formula in Power Apps on the date/time picker or is there a native function that would exclude dates that are taken?
Thanks!
How do you want to submit the events? By EditForm?
You can add a condition on the Submit button, if the date-time is taken, show an error notification.
please try the following code to OnSelect property of Submit button:
ClearCollect(Col_Cal,'Calendar Name'); Clear(ColTest);
ForAll(Col_Cal,If('End Time_DataCard1'.Update<='End Time' && 'Start Time_DataCard1'.Update >= 'Start Time', Collect(ColTest,true)));
If(true in ColTest,Notify("Schedule Repeated",NotificationType.Error),SubmitForm(FormName))
Sik