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 / Calendar events not di...
Power Apps
Answered

Calendar events not displaying properly in Gallery control

(0) ShareShare
ReportReport
Posted on by 26

I am having trouble displaying calendar events properly in a vertical Gallery control.

 

I ran the following code to get the Calendar ID and then use the ID to retrieve the events. 

Set(varUserCalendarId,
LookUp(Office365Outlook.CalendarGetTablesV2().value,
name=Office365Users.MyProfile().Mail).id
);

Set(varCalendarEvents,Office365Outlook.GetEventsCalendarViewV3(
varUserCalendarId,
Text(Date(2022,11,01),DateTimeFormat.UTC),
Text(Date(2023,01,30),DateTimeFormat.UTC)
).value);

 

However, the events displayed in the Gallery showed only the event date. The timing and event title were not displayed.

calendar1.png

 

I tried another piece of code:

Office365Outlook.CalendarGetItems(varUserCalendarId).value

 

But this time, only the title was shown and the rest is gibberish:

calendar2.png

 

How can calendar event dates, timings and titles be retrieved and displayed properly?

 

The documents and blogs I referenced are:

Solved: Display Outlook Calendar Events in PowerApps - Power Platform Community (microsoft.com)

Power Apps Guide - Outlook - How to add, edit, delete, and list Outlook calendar events - Power Apps Guide - Blog

Categories:
I have the same question (0)
  • taiping8 Profile Picture
    26 on at

    Any one who is able to extract calendar events properly?

  • Verified answer
    HamidBee Profile Picture
    932 Super User 2024 Season 1 on at

    The way you are displaying the events in the Gallery control might not be properly configured.

    To display the events with their dates, times, and titles, you can use the "Items" property of the Gallery control and set it to the "varCalendarEvents" variable that you created with the code you provided.

    Then, you can add three labels inside the Gallery control, each one bound to a different property of the events: one for the date, one for the time, and one for the title.

    For example:

    • For the date, you can use the "Start" property of the event, which returns a date and time. You can use the "Date" function to display only the date.
    • For the time, you can use the "Start" property of the event and use the "Time" function to display only the time.
    • For the title, you can use the "Subject" property of the event.

    Here is an example of how you can set the Items property and configure the labels:

    1. Set the Items property of the Gallery control to "varCalendarEvents"

    2. Add a label inside the Gallery control and set the Text property to:

     

    Date(ThisItem.Start)

     


    This will display the date of the event.

    1. Add another label inside the Gallery control and set the Text property to:

     

    Time(ThisItem.Start)​

     

    This will display the time of the event.

    1. Add a third label inside the Gallery control and set the Text property to:

     

    ThisItem.Subject

     

    This will display the title of the event.

    Please note that the properties that you are using are specific to the Office365Outlook connector. If you are using a different connector, the properties will be different.

    You can also format the display of the date and time by using the Text function and a format string, for example :

     

    Text(ThisItem.Start, "dd/MM/yyyy hh:mm:ss")

     


    It's also worth noting that you need to make sure that you have the correct permissions to access the calendar events and that you are using the correct connector to access the calendar.

     

    If my reply helped you, please give a 👍, & if it solved your issue, please 👍& Accept it as the Solution to help other community members find it more.

     

  • taiping8 Profile Picture
    26 on at

    Thank you very much for the explanation and steps. The gallery is now able to display the calendar information perfectly. 👍

     

    I would just to share a couple of minor tweaks to the code. To show the start and end date and timing of the calendar event, I used ThisItem.startWithTimeZone and ThisItem.endWithTimeZone respectively. 

    For the gallery control, I also selected a different layout in order to have more labels to display the event information. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard