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,
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.
Let us know how you go, I'd be interested
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:
Bind the dropdown to the DataSources collection and then add the gallery and set the Items property:
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 !!!!
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.
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)
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
Will need to set up each 'source' with multiple datasources". something like:
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights