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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Calendar view in Power...
Power Apps
Unanswered

Calendar view in Power Apps with Nested gallery

(1) ShareShare
ReportReport
Posted on by 10

Hi,

I am creating a calendar view for one of my projects in Power apps (without using any PCF control).

 

The calendar should look like this below

DebarthaMitra_0-1720164226395.png

I am currently trying to implement the day view. As you can see, the app should use outlook connectors to show the shared calendar (shared with the logged in user in power apps) appointment on power apps tool. For example, you can see the Petra's appointment or event (for a day) easily without opening the outlook calendar. 

 

First (to get number of data between 8am to 7pm, at 60 minutes interval), I created collection using sequence and also to hold the integer value of the relevant time, I used DateDiff function, so it looks like below

 

 

With(
 {
 tvBlankSchedule: AddColumns(ForAll(Sequence(49),Time(8, 15 * (Value - 1), 0)),ValueInt,
 DateDiff(
 TimeValue("12:00 AM"),
 Value,
 TimeUnit.Minutes
 )
 )
 },
 ClearCollect(colCalendarDraft,
 ForAll(
 Sequence(CountRows(tvBlankSchedule)),
 Patch(
 Index(tvBlankSchedule, Value),
 {RowNo: Value}
 )
 ))
);

 

 

 

After this I used Get calendars action (by calling Power automate flow) and got the shared calendars (of Petra and Mirjam) and then used "Office365Outlook.GetEventsCalendarViewV2" to get the events for every shared calendar and created another collection to store this. Then created similar like above, I added two more columns (start app time and end app time) in appointmentevent collection which has the date diff value from 12:00 am in int. value and then I compared those columns with the ValueInt column of colCalendarDraft to get the final collection (named as colCalendarFinal)

 

The colCalendarFinal looks like this for any selected date now, where Appointment column has the table of appointments of events

DebarthaMitra_2-1720167229660.png

So after this, I used horizontal gallery which will keep the time (from 8am to 12am) using the colCalendarFinal collection and under that I used another vertical gallery (nested gallery) to showcase the events from each person, the nested gallery items is bounded to Filter(ThisItem.Appointment, CalendarOwner in uniqueEmailCollection2), where uniqueEmailCollection2 has email ids of the persons (Petra etc.).  One button has been added to the nested gallery to showcase the event subject and calendar owner (email Id of the shared calendar owner)

 

Here, I need to showcase the all same appointments (same subject) for one person in same line and also instead of showing multiple names for same appointment subject, it should show the subject name only once. As you can see below, subjects are appearing multiple times for same appointment with same subject and also same appointment (with same subject) for one person are not in same line.

 

DebarthaMitra_4-1720169217210.png

 

Please let me know if you can suggest something on this. How should I position the button or do I need to change some element in the button.

@Pstork1 @WarrenBelz please let me know if you can also assist in this.

 

 

Thanks.

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @DebarthaMitra ,

     

    Given that you want the appointment subject to only show in the first time slot, you could leverage the Start time of the appointment, in relation to the time slots, to set the Text property of the button inside the vertical gallery:

     

    If(
    	(ThisItem.Start >= ThisItem.Value && ThisItem.Start < DateAdd(ThisItem.Value,1,TimeUnit.Hours)) || Hour(ThisItem.Value) = 8,
    	ThisItem.Subject,
    	Blank()
    )

    Because the calendar starts from 8 AM, the Subject should always be shown in the first column, even if the appointment starts before that time, hence the exception for that.

  • DebarthaMitra Profile Picture
    10 on at

    Hi @BCBuizer 

    Thanks for your comment, the requirement has been changed and I cant use the nested gallery as it will not allow me (or I did not find a way) to merge items or button in horizontal way in the nested gallery. I created another post where I used only the horizontal gallery, and mentioned the details. Can you please check that one and let me know your feedback.

    FYR, the post is this Calendar view in Power Apps (without nested gallery)  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard