Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Calendar view in Power Apps (without nested gallery)

(1) ShareShare
ReportReport
Posted on by 10

Hi,

This is regarding my previous post of Calendar view in Power Apps with Nested gallery  on this forum and there were some changes by client, so basically I cant use the nested gallery (in the calendar) as it will create small boxes (of event subject) of one appointment for several times and there is no way I can merge that into a single box (as I am using nested gallery where these box subjects are there).

 

I approached in different way, where I didnt use the nested gallery and only used one Horizontal gallery.

As I mentioned before, I am building one calendar. The calendar should look like this below

DebarthaMitra_0-1720435525635.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_1-1720435526032.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 positioned several buttons (for each person) (for example- I used two buttons in this example for two persons) to showcase their events (positioned in vertical order in the horizontal gallery). Looks like below

 

DebarthaMitra_2-1720435839665.png

As you can see the buttons are positioned vertically in the horizontal gallery.

DebarthaMitra_4-1720436555839.png

 

The text of the button is changed to 

First(Filter(ThisItem.Appointment,CalendarOwner = Dropdown4_1.SelectedText.email)).Subject - where I am currently comparing the person email from the dropdown to the appointment collection and adding the first found subject.
 

Now as you can see the single appointment for each person, but the person may have multiple appointments at the same time and it should show case that in this gallery as well. For example, Alireza may have Doctor's appointment from 8.30am to 10 am beside his status update event at the same time, how can I show case that in this example ? (without hampering the merging of items or buttons in horizontal way)

It will be very helpful if someone can give me any suggestion on this.

 

Thanks.

 

  • DebarthaMitra Profile Picture
    10 on at
    Re: Calendar view in Power Apps (without nested gallery)

    @BCBuizer thanks for your reply, the calendar should look like this, as you can see for the same event subject it should have one continuous line with only one subject (in that case in nested gallery I need to merge items) and if the subjects are not same then there should some gap in between. Not sure whether I can achieve this with nested gallery ? I tried the code you mentioned but it is creating circular reference error.

     

    comm5.jpg

  • BCBuizer Profile Picture
    21,991 Super User 2025 Season 1 on at
    Re: Calendar view in Power Apps (without nested gallery)

    Hi @DebarthaMitra ,

     

    The only way to show multiple items per time period is by using a nested gallery. If you make the height property of the nested gallery dynamic, you may potentially save some space:

     

     

    NestedGallery.Heigth = Self.AllItemsCount * (Self.TemplateHeight + Self.TemplatePadding) + Self.TemplatePadding

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard