Microsoft introduced its Microsoft PowerApps at the end of 2015. The technology behind it has been continuously developed since then, and the possibilities have been expanded.
In the first version, the Microsoft PowerApps were implemented as so-called canvas apps. Even then, the “non-code” approach was in the foreground: Normal users should be able to create applications without having to write a single line of code in one of the usual programming languages - such as C#. The apps are based on a canvas on which a wide variety of elements – buttons, input fields, selection lists, and many others – can be positioned. Necessary logic is added to Microsoft PowerApps via Excel-like expressions instead of code.
Microsoft PowerApps usually processes data that must first be made available to it. (Data) connectors are used to access data. In order to be able to read and write data, special connectors are available for various data sources. The purely canvas-based apps are very well suited to building pixel-perfect apps but reach their limits when it comes to requirements in the enterprise environment. Apps in this area are usually based on a large amount of data and different input masks.
This weakness was quickly recognized and solutions were sought. At the same time, there was the xRM approach in the Dynamic 365 environment. This enabled the rapid implementation of interfaces based on a (data) model. In March 2018, Microsoft decided to combine both technologies into one platform.
A single platform
In the first phase, the various designers for the realization of the Microsoft PowerApps were redesigned or standardized. By reducing the number of designers available and required, the learning curve for implementing Microsoft PowerApps should be flattened. At the end of this optimization process, only the view and form designers remained.
In summary, today’s Microsoft PowerApps can be characterized as follows: The environment includes services, connectors and a data platform and provides an infrastructure for the rapid development of individual business applications. The data can either be on the underlying data platform (Common Data Service) or in various online or local data sources (SharePoint, Excel, Office 365, Dynamics 365, SQL Server, etc.). In addition, business logic and workflows can also be mapped with Microsoft PowerApps. The implemented interfaces are optimized for different devices and can be used seamlessly in the browser or on mobile devices (smartphones or tablets).
Use Microsoft PowerApps
Microsoft PowerApps is very interesting for SharePoint developers because they are integrated into SharePoint Online (Office 365). There are different ways in which Microsoft PowerApps can be created. Either one of the dashboards with the appropriate designers can be used as an entry point or you can start directly with a data source.
In SharePoint, a list represents a possible data source for Microsoft PowerApps. Therefore, the first Microsoft PowerApps is implemented here based on a SharePoint list. The example uses a simple separate SharePoint list (custom list) for the administration of products. It has the following fields:
- Title (text)
- Article No (Text)
- Image (image column)
- Available (yes/no)
- Price (currency)
The entry point for creating a Microsoft PowerApps is directly above the list in SharePoint ( Fig. 1 ). As can be seen from the figure, there are three actions here: Create an app, Show all apps, and Customize forms.
The second menu item is only used to display all apps and is therefore not explained further. The third menu item allows the customization of the list editing forms. These standard forms can now be modified via Microsoft PowerApps. In this way, it is possible to adapt the forms without server-side code – such as C#. An additional program – like InfoPath used to be – is no longer necessary for the modification.
Create a form
After selecting the menu item, you will be directed to the form designer. It directly loads the form and allows you to customize the fields, as shown in Figure 2 . Within the form designer, numerous options are provided for customizing the form. For example, fields moved and rearranged.
- With special formats as well
- Be supplemented with formulas and actions.
Figure 3 shows a customized form. The operation of the designer is intuitive and comparable to the UI designer integrated in Visual Studio, for example for WinForms applications. The possibilities per control are very numerous and thus allow a good adaptation to special needs. Figure 4 shows the default properties for a text box for clarity.
As can be seen, numerous adjustments are possible. Often, however, static adjustments are not enough and the form should adapt depending on the input values. Typical scenarios are, for example, the conditional hiding and showing of form controls or conditional mandatory field checks depending on other form values. Instead of writing code directly for these requirements, the required logic is mapped as functions, similar to Excel. But that doesn’t mean that you can’t use your own logic, implemented with C#.NET, for example; that will be the subject of another issue of the column.
Figure 5 shows the use of a formula for rule-based formatting as an example. The formula makes the corresponding area visible when the value of the element DataCardValue4 is set to true . The figure also shows the division of an input area, which is usually divided into four areas:
- Star Visible
- Error Message
- Data Card Value
- Data Card Key
The first entry, Star Visible, represents the identification of a mandatory field. This can be used to control the appearance and behavior of the display. The second entry allows you to customize the error message. The Data Card Value area is used for entering values and is represented by a suitable control element in the form. The last area is responsible for identifying the field, it is typically represented with a label on the form. There are also some useful functions on the top right ( Fig. 6 ).
Summary As has become clear, many possibilities are available with Microsoft PowerApps, such as the easy customization of standard SharePoint forms and the realization of new standalone apps with multiple interfaces. The direct integration into Office 365 eliminates complex provisioning work and thanks to app versioning, it is possible to revert to a previous version in the event of a problem. The next issues of the column will deal with special details and possibilities that Microsoft PowerApps offer. For more consulting and information you can contact us anytime you want, we are here to help you 24/7 at Al Rafay Consulting (ARC) best Microsoft consulting firm in the USA.