Introduction
In many apps, we require to fetch calendar meetings from outlook. For example, PowerApps applications for Time & Activity, Timesheet, and Daily Reports. So, in this article, we will learn:
- How to fetch the display name of the calendar?
- How to fetch calendar meetings of a logged-in user?
- How to fetch Meeting description or notes?
Step 1 - How to fetch the display name of the calendar?
To fetch the calendar meetings from outlook, we need to add the Office365Outlook connector.
In the Office365Outlook connector, different actions are available like Get Attachment (V2), GetEmail, etc. In our case, we are going to use the action as CalendarGetTables_V2.
For example, add one dropdown and in the Items property of the dropdown use the below formula.
Office365Outlook.CalendarGetTablesV2().value.name
Step 2 - How to fetch calendar meetings of a logged-in user?
To demonstrate this scenario, we will show the calendar meetings in PowerApps gallery based on the selected start and end date.
Add two date pickers for the start and end date.
To fetch calendar meetings, recurrence meetings, and appointments of the logged-in user, we need to add the action as GetEventsCalendarViewV3 for Office365Outlook.
Add one button named Fetch Meetings and OnSelect property of this button add the below formula.
ClearCollect(colCalendarMeetings,Office365Outlook.GetEventsCalendarViewV3(LookUp(Office365Outlook.CalendarGetTablesV2().value,name=drpCalendar.Selected.name,id),dtStartDate.SelectedDate,dtEndDate.SelectedDate).value)
User meetings will be collected in colCalendarMeetings collection. Use this collection in the gallery Items property to display the meetings of logged-in users.
colCalendarMeetings
I have used different labels in gallery to show meeting details as follow,
- Meeting Subject = ThisItem.subject
- Start Date = ThisItem.startWithTimeZone
- End Date = ThisItem.endWithTimeZone
Step 3 - How to fetch Meeting description or notes?
Meeting Notes= Use the HTML TEXT control as like below formula
"<b><font color=black>" & "<div
overflow-y: hidden;
></div>" & Text(ThisItem.body) & "</font></b>"
Now, once we click on the Fetch Meetings button then we can see the Calendar meetings of the logged-in user.
Conclusion
In this way, we have learned How to show logged-in user meetings in the PowerApps grid, How to show the display name of all the calendars in one dropdown and how to filter calendar meetings between the start date and end date.