Moving app from Dev to Prod with seperate SharePoint and Flow connections
So as per the title, I currently have a 1 which i've then copied and called one Prod and one Dev. They both live in the same PowerApps Environment (Default one whcih comes with office 365)
In order to maintain proper version control and a proper release management strategy, i've also gone and copied the data base (SharePoint) and Flows. My question is what is the easiest way to move apps from Dev to Prod?
Just sharing my experience on this as I do similar thing but I also wish there was better way:
I do have a subsite with same sharepoint lists as in main site - subsite is called "sandbox".
During refresh I backup production version of application, then remove it and save Development one as Production
I edit Production just to delete all sources from "sandbox" subsite and add sources from main Sharpoint URL. I do however share Flow between these two. Otherwise I think you need to rename all the calls to Flow within your application too
I use one trick thow, which helps me a little. During OnStart I check to which Sharepoint one of my lists is connected (I do this by looking into first row and one of its columns - somthing with "link" in the name - I do use Polish locales so I don't know original name for this). I set global variable onProd to true if not on sandbox - which I later use to change the name of application and some colors, etc. So I do know on which data source application is running.
I've also created simple helper app - which copies data from lists on Production to Development (sandbox). It also helps to test and repair the code.
I agree that should be much easier. For example this PowerApps Idea might be useful if it would handle custom metadata properties. But still I think that PowerApps - due to its strict syntax control - will not allow dynamic (i.e. programatically changed) change in data source or Flow name, etc.