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 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:
I have the same question (0)

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