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 / Lookup Sharepoint List...
Power Apps
Unanswered

Lookup Sharepoint List headers and retrieve value in a Calendar gallery

(1) ShareShare
ReportReport
Posted on by 125
Hello Everyone,

I have adapted the standard Power Apps Calendar template to my necessities (screenshot attached named Calendar)  and I would like to reflect on every day of the calendar the respective shift of the person using the App.
The information about the person's shift are store in a Sharepoint list (screenshot attached named Schedule) where each column represents a day of the calendar year.

Therefore, I would like to match the name of the worker in the sharepoint list + the day of the calendar e return the shift store in that column. However, I cannot find a way to match the headers of a sharepoint list to retrieve the specific column and then the value. 
Anyone know how to do it?

Thanks in advance for the help.
 
 
Schedule.png
Calendar.png
Categories:
I have the same question (0)
  • SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    Hi  ,
     
    Dynamic filtering and indexing.is the way to go.

    Your SharePoint list named Schedule has: A column for names (e.g., WorkerName). Columns for each day of the calendar year (e.g., 01-01-2025, 02-01-2025, etc.).

    Filter by Worker Name: Use a filter to retrieve the record corresponding to the currently logged-in user.
    Match the Day Dynamically: Retrieve the value of the column corresponding to the selected date in the calendar.
    Display the Shift on the Calendar: Update the calendar to display the shift information for each day.
     
    Add the SharePoint List as a Data Source In Power Apps, add the SharePoint list Schedule as a data source.
    Use the formula to filter the record for the currently logged-in user: LookUp(Schedule, WorkerName = User().FullName)
     
    Suppose SelectedDate holds the date from the calendar.
    Convert the date to the column header format Text(SelectedDate, "dd-mm-yyyy")
     
    Retrieve the shift value dynamically LookUp(Schedule, WorkerName = User().FullName).[Text(SelectedDate, "dd-mm-yyyy")]
     
    In the Items property of the calendar gallery (or wherever the dates are rendered), add the following: AddColumns(
        CalendarDates, // This is your calendar data source
        "Shift",
        LookUp(Schedule, WorkerName = User().FullName).[Text(ThisRecord.Date, "dd-mm-yyyy")]
    )
     
    In the calendar day display control (e.g., a label), set the Text property to ThisRecord.Shift
     
    If there’s no shift data for a specific day, display a default value If(IsBlank(ThisRecord.Shift), "No Shift", ThisRecord.Shift)
     
    Ensure the date format in your SharePoint column headers matches the format used in Power Apps (dd-mm-yyyy).
     
    pls try - thanks
  • YapaYapa Profile Picture
    125 on at
    Hello @SaiRT14 :)
    First of all thanks for your answer.

    Unfortunately, that did not solve my problem.
    However, let me provide more context and perhaps we can get there.

    Firstly, regarding this part: "Suppose SelectedDate holds the date from the calendar.Convert the date to the column header format Text(SelectedDate, "dd-mm-yyyy")" as per screenshot below, this is the format I get if i use your formula. As a consequence the other formula "Retrieve the shift value dynamically LookUp(Schedule, WorkerName = User().FullName).[Text(SelectedDate, "dd-mm-yyyy")]" gives me an error and it seems not to work. 
     
     
     
    Secondly, I do not have any database connected to the calendar template. This is the item property of the calendar gallery (attachment: Items property of calendar)

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 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard