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 / Choose Data Source bas...
Power Apps
Answered

Choose Data Source based on Gallery selection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm currently trying to populate a Gallery (Gallery2)

Collect2.PNG

 

with a Data Source that is determined by the selection of another gallery (Gallery1). Gallery 1's source has a column with the Data Source Tables that I'd like to populate Gallery 2. However, I've learned you can't use a variable or "gallery1.selected" in the "Items" field of Gallery 2. I've seen some solutions, but I'm having trouble making sense of them for my situation. Any help would be great! 

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Anonymous 

    You might be interested in this recent thread about dynamic data sources.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-can-I-create-a-dropdown-that-picks-different-data-sources/m-p/717376#M229566

    In summary, you would base the items property of Gallery2 on a Switch statement that refers to Gallery1.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @timl 

     

    Thanks for the response.

     

    I've updated Gallery 2's Item formula with what i got from that other discussion. However, Gallery 2 doesn't respond when I click the item in Gallery 1 that would work with this formulacollect 4.PNG

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @timl 

     

    Got it to work by setting the first part of the switch variable that was set when I chose from Gallery 1. Thanks for the help!

     

    Is there a more streamlined way to do this if my information was hosted somewhere else? I'm running into issues with the 2000 item issue with PowerApps, which is why I need different Data Sources (Multiple Excels instead of 1)

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Anonymous 

    I'm glad that works. I think my comment to you in this post addresses the question above. If not, feel free to post a new question.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-can-I-create-a-dropdown-that-picks-different-data-sources/m-p/718498/highlight/false#M229972

     

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
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard