Notifications
Announcements
Hi,
I have an app that I would like to manage across three environment's. (DEV-TEST-PROD) My app is deployed in solution form and connects to my database via flows as well as directly in my app by the SQL connector. I have a DB for each environment and would like to switch to the correct DB when I deploy the solution to each respective environment. I have been able to successfully do that for the flows using an environmental variable. However, I cant seem to find a way to change from one DB to the other for the connections that directly reference the DB in my PowerApp. Surely, this must be possible. Does anyone have any advice?
Hi @DeeCiii15 ,
Yes it is possible. Are you doing your deployment manually (export and import) or by using Ci/CD pipeline?
For manually, you need to first create connection in target environment: E.g. Go to Test environment and the create SQL server connection using the db credentials that you have for test environment (Test db). Same applies to production also. Then while manually importing the solution to test environment, it will ask you to choose connection that you have created. Same applies for prod also.
For CI/CD pipeline, you need to mention the connection reference details with the connection ID in deployment setting file. Please check this https://learn.microsoft.com/en-us/power-platform/alm/conn-ref-env-variables-build-tools for prepopulate the deployment setting file.
------------------------------------------------------------------------------------------------------------------------------
I hope this helps.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.
Thanks,
ANB
I tried doing that, but it seems only applicable to the SQL references that I use in my flows that are tied to the app. It seems that the SQL references that are used directly in the app (i.e. FILTER SQL_TABLE) are only maintained in the PowerApp itself.
Hi @DeeCiii15 , For PowerApps apps, you need to use the connection which is meant for the specific environment and when you deploy that to target environment, the connection which will be already created in target environment will pick while importing. I mean you need to pick it manually.
Flow used connection reference.
------------------------------------------------------------------------------------------------------------------------------I hope this helps.Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.Thanks,ANB
Sorry if I am missing something here. What I'm confused about is the creating connection in the target env. When I create an SQL connection in the environment (outside of my PowerApp), I'm not asked for a server or database name. How will it know what database to use? Below is all it asks for.
Secondly, I currently have a solution deployed to my environment. The PowerApp is connected to my DEV db, but there is no connection existing in the environment for this SQL connection. The only reference I can find is directly in the app. The highlighted SQL connection below is in my env, but seems to be only related to the SQL connections existing in my Power Automate flows based on the dependencies.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 765 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 272