As PowerApps continues it’s long march to maturity, it’s important to stop and evaluate where the platform is in regards to developing and managing your PowerApps in the Enterprise.
In a traditional Enterprise Development organization, you have many tools and strategies available to you when architecting, designing, testing, and managing code bases for your applications. Methodologies such as Agile, Source Code Management such as GitHub, and IDE’s like Visual Studio, empower developers through the Application life-cycle in the most efficient way possible.
With PowerApps however, the tools are still very immature in regards to enterprise development and management of PowerApps. Remember, PowerApps was designed to be leveraged by Business users to create their own Mobile apps. That is it’s core audience. And in a perfect world that would hold true, but what experience tells me is that Business users:
A. Don’t really always want to learn how to make apps.
B. Don’t want to devote time to learning PowerApps
C. Don’t want to be responsible for supporting any created Apps if A and B don’t apply to them.
So, realistically, most organizations will turn to I.T. for the development and management of these authorized PowerApps that will run in the organization. In order to be effective in designing, creating, testing, and supporting the PowerApps in your organization, I have put together my thoughts and strategies on the best way to go about this. (Please NOTE: This is in no way indicative of Microsoft’s view of how to go about this, this is my own experience with PowerApps). This will be a multi-part posting, so I hope you find some value in these blog posts.
For this article, I wanted to start simply, and cover the tools we have available to us when Creating and Managing PowerApps. We’ll begin with our design tools, and then transition to the tools Microsoft provides to manage our PowerApps.
Tools of the Trade
Congratulations! If you’re reading this, either you’re interested in PowerApps, or one of your Business users has created a PowerApp that is now critical to the company and thrown it at you to manage. Either way, it’s time to get comfortable with managing these Apps!
PowerApps Design Studio (Web and App Versions)
So, I was originally going to compare and contrast the differences in using the App version or the Web version of the PowerApps Design Studio, and then Microsoft went ahead and deprecated the App version. Probably because the App version was a memory hog, and they realized that web performance provided a better experience, especially for very complex PowerApps.
I’m not going to dive into how to design a PowerApp with the Design Studio, but for this topic, it’s important to understand that all Development and management of PowerApps should be performed through the Web Version from now on.
In PowerApps, you have the ability to segregate your PowerApps/Connections/Data Policies into different environments. The environments are containers that wall off environments from each other. For example, if you have a Development Environment and a Production Environment, you can create PowerApps and Connections with he same names, but the PowerApps and Connections have no knowledge of the other ones in the other Environment. This makes it easy to Develop in one environment, and then Promote to another environment without having to make too many changes. With Data Policies, you can create environments to apply distinct Policies to, and allow users to be able to use business data depending on the environment they have access to.
Every time you Save a PowerApp, it creates a new version of that PowerApp. I know I make mistakes all the time, and with versioning, it’s easy to roll back to a previous version with a button click. This also can come in handy when the underlying PowerApps Platform is upgraded.
For example, lets say you make a bunch of changes to your PowerApp on Friday. On Saturday, Microsoft upgrades the PowerApps Platform. When you edit the PowerApp on Monday, PowerApps automatically upgrades your App to the latest version, which you Save and Publish. Users then begin to complain of an issue that was introduced by that PowerApps platform upgrade (Yes folks, Microsoft does introduce new bugs when they upgrade the platform).
With Versioning, you can also roll your PowerApp back to the last good version, on the specific version of PowerApps you know was working.
The ability to Import and Export PowerApps is an invaluable tool for managing across different environments (and Tenants!). Export will package up and save your PowerApp (and connections and Flows) into a zip file, which you can then use to create a new PowerApp in a different environment (or update one that is already there).
Manually Editing PowerApps Files (not supported)
Believe it or not, if you’re in a pinch, you CAN actually edit the files that PowerApps gives you when a PowerApp is exported. As far as I know this is NOT supported by Microsoft, and it is a bit tricky to do. But, if you’re adventurous, here’s how you can do it:
- Export your PowerApp (This will Save it as a zip file to your local machine)
- Extract the files to a folder. This will extract a manifest.json file, and a Microsoft.PowerApps directory
- In the Microsoft.PowerApps directory, there will be a couple of sub folders, where you will eventually find various files. The one you want to focus on is the .msapps file.
- Download 7-Zip from https://www.7-zip.org/ . The reason for this, is that 7-Zip will allow you to edit a file without removing it from the Zip File. This is important, as I haven’t found a way to repackage .msapp files. ( I also haven’t looked to hard to find one, don’t judge me)
- Change the file extension on your .msapp file to .zip
- Open 7-Zip and then open the newly renamed .zip file
- Most of the rules, controls, etc, that make up your PowerApp are defined in the Entities.josn file. Right click that file, and click Edit. This will open the file up in Notepad. You can copy and paste it into an editor of your choice, but you need to make sure you copy back any changes you make into the same Notepad File that was opened.
- Save the Notepad file, and when you return to 7-zip it will ask you if you want to update the file in the archive, click OK.
- Rename the .zip file back to a .msapp file.
- Re-zip the whole package (manifest.json and Microsoft.Powerapps directory)
- Import back into PowerApps
Congratulations, you just hand edited a PowerApps JSON file. Which you shouldn’t really do, unless you need to make bulk wholesale changes throughout a PowerApp. (For example, I wanted to change how a variable was defined, and it was much easier/faster to do a find/replace in Notepad, vs. changing it in the designer.)
This ends Part 1 of this series. The next installment will cover the type of planning and guidance that can help make your PowerApps journey successful. Please check out some of my other articles to take a deeper dive into the product, and as always, please feel free to reach out to me at firstname.lastname@example.org