I have below SQL server environments (Not the Power Apps environment):
Dev Environment: Server A -> '[DevDBName].[SourceTableName]'
Pre-Prod Environment: Server A -> '[ProdDBName].[SourceTableName]'
Prod Environment: Server B-> '[ProdDBName].[SourceTableName]'
If you observer above,
1. Table name SourceTableName and its schema is same in all environments.
2. Dev and Pre-Prod reside in same Server A and Prod is in different Server B.
3. Both Pre-Prod and Prod have same DB name ProdDBName.
Below is what I am currently doing:
1. When I migrate Power Apps from Dev to Pre-Prod, I have to visit each formula in Power Apps and change the DB Name.
2. I am yet to plan for migration of Power Apps from Pre-Prod to Prod and yet to decide on keeping both the Power Apps on same power apps environment or keep them in separate environment.
Below are my queries:
1. What is the best possible way to avoid manual db name change in all the formulas from DevDBName to ProdDBName?
2. If I move from Pre-Prod to Prod, and if they are in same Power Apps environment, do I still have to go everywhere and change it manually as both db names are same?
3. If I plan to keep Pre-Prod and Prod in different Power Apps environment, do I still have to go everywhere and change it manually as both db names are same?
Thanks in Advance,
@SidhharthM : I hope I understood this correctly, if not please rephrase the question if possible.
Even though the DB and table names and schemas are the same, you might need to manually select the new connection. This is because it does not only go by name, but by ID as well.
1. You could export the app as a package and edit the JSON, but this might break the app and is unsupported.
For 2 and 3, my opinion is that you might have to change any connection/selection that points at a different location than where the original app pointed.
@edguerre Thanks for the input. Yes, of course we need to change the connection when connecting to different data source. But my main issue is manually going everywhere in Power Apps formulas and changing db name. Is there any better approach for this?
PS: I have tried changing db name in json file, but still I had to change the db name manually everywhere.
Well, there is a way, especially when we use Data verse or SharePoint. We can use Solutions for migrating from one environment to other, all the db tables get automatically created:
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.