Is there a way to progmatically add a Data Source in Power Apps?
Or dynamically add a data source based on a selected selected list of list table from a dropdown list.
I tried to follow one of the Blog "Connecting Datasource Dynamically In PowerApps Using Power Automate" but there seems to have some missing steps in Part 2.
Joel HipolitoPosted Apr 11, 2025, 12:22 AM
Thank you Daniel
My apologies in advance, I'm fairly new to this.
I got stuck in Step 3 in your response, I can't seem to find a Crete Data Source action. On which connector are you referring this too?
and for the blog,
4. Add a New Step -> “Get Items”, and configure it with the Site URL where all quiz lists are created, for a list name, select “Ask in PowerApps” from dynamic content
Daniel WrightPosted Apr 10, 2025, 6:42 PM
Adding a data source in Power Apps can be a powerful way to enhance your application's capabilities. While Power Apps doesn't have a direct way to programmatically add a data source within the app interface, you can achieve a dynamic data source selection based on user input like a dropdown list.
One approach to dynamically adding a data source based on a selected item from a dropdown list is by utilizing Power Automate (previously known as Microsoft Flow) in conjunction with Power Apps. Here's a high-level overview of how you can achieve this:
1. Drop-down List Setup: Create a dropdown list in your Power App that contains the list of data sources users can select from.
2. Power Automate Flow: Set up a Power Automate flow that triggers when the dropdown value changes in Power Apps. This flow should handle the logic of connecting to the selected data source.
3. Dynamic Data Source Connection: Within the Power Automate flow, you can utilize actions like "Create Data Source" to dynamically connect to the selected data source based on the user's input.
4. Return the Data to Power Apps: Once the data source is connected in Power Automate, you can retrieve the required data and return it back to your Power App for display or further processing.
Regarding the missing steps you encountered in the blog tutorial you mentioned, it's essential to ensure that each step in the process is correctly configured and that the necessary permissions are set up for data source connections.
If you encounter specific issues or need further guidance on a particular step, feel free to provide more details or share the parts of the tutorial that seem unclear. This way, I can offer more targeted assistance to help you overcome any challenges you're facing in dynamically adding data sources in Power Apps.