In the previous chapter, I discussed Power BI, Microsoft’s data and reporting platform. In this chapter, I will be discussing Microsoft Power Apps, a new and innovative way to build solutions within Microsoft 365.
Like Power Automate and Power BI, Power Apps is the final application to make up the Power Platform. This platform allows for more advanced workflows, reporting, and now applications to make collaboration even more engaging. Power Apps is available in a wide variety of Microsoft 365 licenses, including E1, E3, and E5 Microsoft 365 plans.
Microsoft Power Apps allows you to create custom applications with connections to a wide variety of data sources. This application was designed to provide low- or no-code interfaces to users to begin to build applications. As your skills develop in Power Apps, you can then begin to build advanced Power Apps and have the ability to add code.
The goal of this chapter is to expose the reader to the basics of Microsoft Power Apps. For more information on using and creating great Microsoft Power Apps, please take a look at Beginning Power Apps: The Non-Developer's Guide to Building Business Applications, Second Edition, by Tim Leung.
Overview of the Power Apps Interface
Home: Provides a link back to the home screen.
Learn: Resources such as training, support, and documentation.
Apps: Power Apps that have been developed by you along with the last time modified, owner, and Power Apps type.
+ Create: Preconfigured Power Apps templates to use.
Data: The Data menu contains Tables, Choices, Dataflows, Export to data lake, Connections, Custom Connectors, and Gateways. Tables are a way to structure and store data; Power Automate and Power Apps share tables. Connections will allow you to see all the connections that are used for your account, while Custom Connectors will list any custom connectors used. Gateways, which refer to data gateways, allow the cloud services to reach on-premises data.
Flows: Shows flows that have been created on the Power Automate platform.
Chatbots: Allows you to build chatbots to interact with users in a preprogrammed question/answer format we are used to.
AI Builder: Allows you to add artificial intelligence to your applications. This functionality can be used to extract information, detect objects, or utilize predication.
Solutions: Allows you to import prebuilt solutions from the marketplace or from software providers. These solutions can then be used within the Power Apps platform.
Start from data: Predefined connectors that allow you to connect to a wide variety of data sources including but not limited to Microsoft 365, SQL, Dropbox, Oracle, and so on.
Make your own app: Default templates that allow you to create one of the three types of applications. We will explore each type more in the next section.
Learning for every level: Provides training and documentation resources.
Your apps: A list of applications that you have created.
Power Apps
Types of Power Apps
Start from Data
Power Apps gives you the option to begin development from a dataset. This dataset can be in Excel (as a table) or any of the other supported datasets. This is one of the fastest ways to build a PowerApp, and shortly we will walk through an example of creating a PowerApp from a dataset.
Canvas
Canvas apps are a type of PowerApp and are aimed at a zero-code development process. These apps allow the app builder full control over the interface and can connect to a wide variety of data sources. Canvas apps can be formatted to fit the tablet or phone devices.
Model Driven
Model-driven apps are a bit different than canvas apps in that they are based on the data source, not the user experience.
Portal
Portal apps are the third type of Power Apps that is available for use. These apps differ than the other apps in that they align with Dynamics 365. These apps are externally facing websites and allow for outside users to connect with a variety of authentication providers.
Overview of the Power Apps IDE
Left Navigation Menu
Tree view: This option shows us the hierarchical view of the different screens that are part of our application. Each screen drop-down will show the different elements added to that screen in a list.
Insert: This option allows us to add items to our current screen in our app. There are many options from buttons to user input. We will cover these options in more depth in a bit.
Data: This option will allow us to see all of the data we are bringing into our app to use. We are also able to connect new data sources by clicking Add Data via this option.
Media: Here we are able to see media, photos, videos, and audio files that we have access to in the app. We are also able to upload new items via this menu option.
Advanced tools: We have two tools in this option: Monitor and Tests. Monitor allows us to see our app usage and the performance and monitor for possible bugs, presented in the app. Tests allows us to write tests to validate our app and ensure it does the correct actions depending on how our tests are written.
Create a PowerApp
Your First PowerApp
Now that we have a basic understanding of how to access Microsoft Power Apps, let’s create one as seen in Figure 13-3. Our first PowerApp will be created from a data source (Excel). This will allow Power Apps to build out the majority of the entire application and with very little code.
Now that the table has been completed and formatted, the final step is to rename the table, which can be done from the Design tab of the Excel ribbon. We are now ready to save the file to a location that Power Apps can access it. For this example, I will save the Excel document to my OneDrive. If you need a refresher on OneDrive, please refer to Chapter 3, which details the OneDrive application.
The Excel file must be closed during this process as Power Apps creates connectors to read/write to the file. The file cannot be open while the application is in use as it will cause conflict errors.
Power Apps ribbon (1): The Power Apps ribbon contains tabs that allow to insert controls, view objects of the PowerApp, and be able to set actions such as start a Power Automate. You will also be able to save the application and preview it.
Object panel (2): This panel shows the various components included in the PowerApp, as well as the ability to insert components similar to the Insert tab in the ribbon.
Main design area (3): This stage shows the PowerApp, and you are able to modify it as needed.
Properties panel (4): As you select an object in the Object panel, any associated properties will be displayed in this panel.
Let us preview our first PowerApp; to do so, click the play button in the upper-right corner. The application will render within the browser as a new tab, and the following functions will be available out of the box. These functions include sorting, adding an item, deleting an item, and refresh. To add a new item, click the plus sign in the upper corner of the application and enter an employee name and a lunch item. When entered, click the checkmark icon in the upper corner of the app to save your changes.
Like adding, deleting is very straightforward as well. To delete an item, select an item from the application and click the trash can icon in the upper corner. To edit an item, click the pencil to edit the item. Any changes within the application will be automatically saved back to the Excel spreadsheet.
This is a very simple PowerApp but shows the basic functionality that can be provided. As your skillset grows, you will be able to create more complex Power Apps.
Editing a SharePoint List Form with Power Apps
As we briefly mentioned in Chapter 2, we can edit the SharePoint list forms in Power Apps. For the IT users who are familiar with InfoPath, this is not a full replacement; however, it is getting closer. For new users, InfoPath, which has been deprecated from the Office product, was Microsoft’s attempt at a user-friendly form product.
List name: Budget Details
Column: Title (single line of text)
Column: Amount (currency)
Column: New Request (yes/no)
Column: Vendor (single line of text)
Column: Renewal (yes/no)
Column: Contract Number (number)
The first thing we are going to do is to remove the ability to add an attachment; to do so, simply delete the attachment field by highlighting the field and pressing the Delete key.
This toggle is identified as New Request_DataCard1, and the toggle control is called DataCardValue3 as highlighted in red in Figure 13-17. The correct formula for this example is “If(DataCardValue3.Value = true, true),” which will be used to hide the Vendor field. Other types of fields such as choice can be used for conditional formatting.
As you can see, Microsoft Power Apps offers an extraordinary interface to begin crafting applications and editing list forms within SharePoint. This chapter only exposed a very tiny bit of the power of Power Apps. I encourage you to explore the available templates to understand and interact with nearly built applications provided by Microsoft. If you are interested in learning more about Power Apps, please take a look at Beginning Power Apps: The Non-Developer's Guide to Building Business Applications, Second Edition, by Tim Leung.
In the next chapter, we will summarize the key aspects of the applications and provide a very high-level plan to use them.