Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Data Sources as a Dropdown

Hi Everyone,


Is there a way to populate a drop down control with all data sources currently connected to a particular application. For Example If i have 5 sharepoint lists with the same fields and want to be able to select a specific list to view its content. 


Thanks for the help,



Responsive Resident
Responsive Resident

Try toggle the Items attribute with an If statement first with a variable that shadows the connection name. Sounds great.


When you want to filter a gallery/data-table or update a form. You may need to also create an if statement with the variable to switch the following.





or similar


Let us know how you go, I'd be interested

Responsive Resident
Responsive Resident

I believe the easiest way to achieve it is to bind each datasource to a different gallery and the based on a specific trigger (ex. a dropdown control having the list of available datasources) to show/hide the proper gallery.


This way each gallery can be customized according to the list most relevant information (may be pictures in ones)


shouldn't be so time consuming for a limited amount of lists ...


Another option is to declare a collection with the names of all sources, bind it to a dropdown and then use the switch function to select the proper datasource.



On the form OnVisible:


ClearCollect(DataSources,{DSName:"Source1"}, {DSName:"Source2"},{DSName:"Source3"})

Bind the dropdown to the DataSources collection and then add the gallery and set the Items property:


Switch(  Dropdown1.Selected.Value,


However when it comes to binding the gallery items to the corresponding data I only managed when all the datasources had the same data structure including column names.


Hope it helps, please let us know.

bdodu, so if i have a site with  a bunch of identical sub sites, i can use a single powerapp to work with each of the subsites? users could select the sub site on the welcome page?


i would love to see a demo of that !!!!

Responsive Resident
Responsive Resident

Why not? What's changed? 

We are basically talking about putting together a bunch of datasources having the same structure so at the runtime you'll just be directed to the proper collection. Try follow my steps with 2 simple controls - one dropdown and one gallery. 



Carefull when it comes to data/users distributed among multiple tenants, hope it's not your case.

single tenant. one site collection with identical sub sites. users  may have access to one or more of those sub sites.


a dozen  lists in each sub site.  i'm new to powerapps , so just trying to figure this out. 

Responsive Resident
Responsive Resident

Ok, try to follow these steps and let me know the result to better understand how to help you.


1. Create a new app and connect all the lists in each subsite to your app.

2. Define a static collection with friendly names of each list (my first answer step 1)

3. Bind the dropdown to the collection

4. Connect a gallery to the dropdown with the switch statement (my first answer step 2)

5. Having all the data using the same structure and names you can easily bind the controls within the gallery to the underlying data (using ThisItem.whatever-column-name)


By changing the dropdown selection the gallery will display the data from the specific list (within the connected subsite)

Responsive Resident
Responsive Resident

Did you manage?

I did not. (I'm really new to this).

I could not figure out how to bind my controls to the selected datasource.

But from what im learning, I think I dont want to bind the controls to the datasource. I just want to set the items property of the controls.


Running into many that are slowing me down.

btw , I have  a sharepoint backend.

so i cant do

Switch(  Dropdown1.Selected.Value,



Will need to set up each 'source' with multiple datasources".  something like:

        DSName: "EUR",
            TimeSpent: 'timespentlistfromEUR site',
            Requests: 'requestlistfromeursite'

        DSName: "APAC",
            TimeSpent: 'timespentlistfroAPAC site',
            Requests: 'requestlistfromAPACsite'


Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,511)