web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Excluding Dates in Sha...
Power Apps
Answered

Excluding Dates in SharePoint Calendar that are already taken/occupied

(0) ShareShare
ReportReport
Posted on by 65

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! 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    @jviernes 

     

    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))

    Snipaste_2020-02-12_16-25-26.png

     

    Sik

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard