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 Apps
Unanswered

Gallery viewing

(0) ShareShare
ReportReport
Posted on by

I have an app for our employees to track everyone's time off for scheduling purposes. I have 2 galleries: a horizontal one that gets a week's worth of days and dates, and that's nested inside a vertical gallery to get the whole month. This is to make a sort of calendar (shown below).

cmitchener_0-1719253045218.png

 

 

The app can show and update people's time off within this calendar, and I have 4 text boxes within each day that shows people's time off on that day. When one person's time off ends, the next time off record will move up a row; as it is now the first one in the list (shown below). What I am hoping to do is if one record starts in row 3 for example, I want it to stay in row 3 until their time off ends.

 

 

cmitchener_1-1719253557478.png

 

 

Below is the code I use in the first textbox in the galleries. Essentially, it gets the first 4 records that contain a date range that intersects with the current cell's date value and gets the title (this one is for the first textbox, so it indexes the first result, the second textbox would have the same code but indexing the second result, etc).

 

 

 

With(
    {
        tableFilter:
        FirstN(
            Filter(
                'Time Off Calendar Tracking',
                And(
                    'Time Off Start' <= DateValue(lblFullDate_Invisible.Text),
                    'Time Off End' >= DateValue(lblFullDate_Invisible.Text)
                )
            ), 4
        )
    },
    If(
        CountRows(tableFilter) < 1, "",
        Index(Sort(tableFilter, ThisRecord.'Time Off Start', SortOrder.Ascending), 1).Title
    )
)
Categories:

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard