PowerApps Calendar control to displays events from SharePoint Calendar List

 To create a PowerApps Calendar control that displays events from your SharePoint Calendar List, follow these steps:

  1. Add Data Source:

    • First, add your SharePoint Calendar List as a data source in your Power Apps canvas app.
  2. Create a Calendar Screen:

    • Add a Calendar screen to your app. You can use the built-in Calendar Screen Template for this purpose.
  3. Populate the Calendar Control:

    • Set the Items property of your CalendarEventsGallery to filter events from your SharePoint Calendar List based on the selected date.
    • Use the following formula:
      SortByColumns(
          Filter('Your SP Calendar List', Text('Start Time', DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)),
          "EventDate"
      )
      
      This will display events only for the selected date.
  4. Customize the Gallery:

    • Within the Events Gallery, reference the relevant column values from your SharePoint Calendar List in the appropriate labels.
    • Adjust the visibility of elements based on whether events are found on a particular day.
  5. Sample App:

    • You can refer to the sample app attached here.

Remember that PowerApps doesn’t directly work with SharePoint Calendar lists. Instead, you can submit form data to a custom SharePoint list, trigger a Flow (Power Automate) upon item creation, and create corresponding events in the SharePoint calendar list after approval

Happy building! 📅🚀

No comments

Powered by Blogger.