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 / Connection between dro...
Power Apps
Answered

Connection between dropdown-calendar-selector, a gallery and two SharePoint-Lists

(0) ShareShare
ReportReport
Posted on by 24

Hey guys, 

 

im trying to connect my dropdown-calendar selector to a gallery, so i can switch between two data sources or calendars and the data shown in the gallery is responsive to whichever calendar i picked.  One is to show the attendances of regular staff and one for trainees. I've been searching for a few days as well as asking my colleagues but i cant seem to get this to  work since im a power-apps beginner. 

What you need to know: 

I have created two outlook calendars named exactly like the two SP- lists but i did not do anything further like connect them to power apps or my SP- list, since i did not got to that part yet and dont know how to do it. 

Also on both SP-lists i have deactivated the "Title" column and made it invisible, so maybe the error lies here, as you can see title is mentioned two times in code above.  Furthermore i renamed the collumns of each lists, so they are basically the same with different list names. 


This is the working code (no error messages)  in the items property of the gallery : 

 

If(
dropdownCalendarSelection4_4.SelectedText.Name = "Interne Anwesenheiten", SortByColumns(Filter('Interne Anwesenheiten', DateValue(Von) = DateValue(_dateSelected) || DateValue(Bis) = DateValue(_dateSelected)), "Title"),
SortByColumns(Filter('Azubi Anwesenheiten', DateValue(Von) = DateValue(_dateSelected) || DateValue(Bis) = DateValue(_dateSelected)), "Title")
)

 

What im trying to achieve: 

I want the gallery to be responsive to which calendar is selected, so the events shown in the gallery depend on the selected calendar. 

Do i need if statements in the boxes of my gallery row as well? Since i have 5 boxes in my gallery row (to show: Picture, Name, Reason, From, Till) do i need to specify which source to pick it the data from or will it work automatically based on which calendar i picked? 

Also how would i make the circle i have marked on "Screenshot" to be responsive as well ? so the circle only appears depending on which calendar you choose, since currently the circle  is always visible whichever calendar i pick. 

 

Trainee attendances.png
Normal Attendances.png
Screenshot.png
Categories:
  • Verified answer
    Scott_Parker Profile Picture
    1,090 on at

    If I understand you, to change the items of the gallery based on the selected calendar, set a variable to a different value based on which calendar was most recently changed. Something like::

    CalendarControl1.OnChange = UpdateContext({SelectedCalendar: Calendar1})

    Then have your Gallery.Items property change which list it is getting the data from based on the value of the variable.

    As long as your lists have the same fields and data types, you don't need to change anything about the controls in the gallery to get your data from multiple different lists. The data will flow into the controls in just the same way regardless of where it originally came from.

    Regarding the circle question, change the visible property.

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard