Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

Introduction to Power Apps (Part I)

Sean Keaveny

Microsoft Power Apps is a brand new release which allows the user to quickly create low or no-code business applications for the PC, tablet, or mobile devices. Microsoft PowerApps is an enterprise level software service created to connect, create, and share business applications. It offers the ability to connect to data from an on-premises server or SaaS services securely, as well as the ability to build cross-platform applications very quickly. By accessing an exposed connection to a repository, and using the templates provided to us from Microsoft, a developer can produce a sophisticated application in less than an hour.

In this blog post, I will show you how to:

1. Use PowerApps to connect to SalesForce, SQL, or SharePoint

2. Setting up a new PowerApps application

3. How to Design Your PowerApp Application

4. How to Add / Delete Entities

Microsoft PowerApps can connect you to dozens of applications and data sources. Along with a common data model and their own propriety services, Microsoft has partnered with various third party services (such as SalesForce, Twitter, and GoogleDrive) to provide PowerApp users with over 50+ connectors. The complete list of available connections is available at https://powerapps.microsoft.com/en-us/tutorials/connections-list/. With Salesforce or any cloud-based service application, getting a connection is as easy at logging into your account. After logging into PowerApps online or opening up the PowerApps Windows App, the user can navigate to the connections tab on the left-hand panel as displayed below:

PowerAppsImg1

Accessing a SalesForce Connection:

To add the connection to Salesforce, all the user needs to do is click on the ‘New Connection’ link on the upper-right side of the screen, and they will be directed to a list of all available connections. Then, scroll down and select Salesforce, and a modal will pop up prompting the user to select if the Login URI will be for a production or sandbox environment. From there, the user will be prompted to log into Salesforce as usual. When logging into Salesforce for the first time through PowerApps, you will receive an email confirmation message to allow access to PowerApps to your Salesforce environment. Once this is complete, your Salesforce connection will be available to use whenever you create a new app. When selecting a new application, you’ll be prompted to select which connection you wish to use, and then the table that you’ll be using for your original dataset. Datasets are tables which are pulled back from your connection, and multiple datasets can exist within the same application with lookup relationship completely intact, as I will display later on.

PowerAppsImg2

Accessing a Connection Through Cloud Services:

SQL and SharePoint connections can be established in one of two fashions, the first being through cloud access by signing into SharePoint Online or Azure SQL, and the second being through an on-premises data gateway. Similar to accessing a SalesForce connection, accessing a cloud service connection is as easy as logging in and following the directed steps.

To Access SharePoint through Cloud-Services:

1. Click New Connection

2. Navigate to the Desired Connection

3. Click the ‘Connect Directly (Cloud-Services)’ option and log in as prompted.


PowerAppsImg3

Accessing a Connection Through an On-Premises Gateway:

Thus far, we have only explored services or data sources which exist in the cloud, but what if you want to use information from your local SQL Server or an on-premises installation of SharePoint with PowerApps? In order to access locally housed data, we’ll need to install and configure a gateway. A gateway is a way of gaping the bridge between the location where your data is stored and the application you’re going to be building, and can be downloaded at https://powerapps.microsoft.com/enus/downalods. Once installed, you can register your local machine or server as a gateway, and then access it using the on-premises data gateway option for your connection. Your current gateways should be located in the configuration pop-up in a drop-down towards the bottom of the modal, as shown below:

PowerAppsImg4

Gateways are a broad enough subject to warrant their own article, but reaches outside of the scope of this blog. For a more in-depth look at the installation and configuration of an on premise data gateway, check out the detailed walkthrough provided by Microsoft at https://powerapps.microsoft.com/en-us/tutorials/gateway-reference.

Set Up:

Once a data source is specified, we have to determine how exactly we want to display and manipulate our data. Microsoft has provided PowerApps users with templates for quick out of the box solutions specified towards common functionality. For example, they currently offer a site inspector, cost estimator, check out, and budget tracker application templates, amongst various others. Each of these templates can be loaded in and then completely customized to suit your particular preferences. Layouts specific to phones or tablets are also offered on the ‘New’ pane, located on the left hand side of the app screen. Users who wish to view how their app might appear on a tablet or mobile device can also access the ‘App Settings’ menu and adjust the aspect ratio to fit their intended device’s resolution. After you’ve selected your data set, you’ll be prompted to choose which table to build your application from. While this table will be the default data used by PowerApps to create your application, you can additionally add additional tables and other connections the app later on after it has been generated.


PowerAppsImg5

Design:

For the purposes of this blog, I’ll be creating a quick account editor where users may open the app to view details related to their accounts as well as clients associated for those existing accounts. Additional, the user will be able to create, edit, delete, search for, and filter accounts and clients. After loading your application, PowerApps will pull back data from your connection and create a sample series of screens. Admittedly, PowerApps does a terrible job are guessing what data might be relevant for your needs, as you might be able to tell from the screenshot of my sample application. However, that aside, what I am provided with is a framework by which I can start building my application by swapping out the pre-existing controls with those more relevant to my needs. You can accomplish this easily by selecting a control and modifying the value through the drop-down shown on the right-hand panel. Alternatively, you may notice that the value is also present in an excel-like function box just beneath the home ribbon. The value of our text-box can be altered here as well, complete with intellisense for the properties available to it. Conditional statements and functions can also be used for the value, but we’ll touch upon that in the next blog, when we are searching and filtering. If you prefer to display the information differently than I have, the layout pane on the right hand side (or on the home ribbon) has a few templates for your screen, or you can always create your own simply by clicking the ‘New Screen’ button on the home ribbon. I’ve selected the layout labeled ‘Browse items, header, subheader, description and footer’ within the image seen below:

PowerAppsImg6

Directly out of the box, we are provided with navigation to a detail screen for our account, which we can use by double-clicking the arrow indicated to the side of each of our account list entries. Note that this action triggers the Navigation(DetailScreen1, None) method, which takes in the destination to navigate to and the transition effect as its parameters. We can edit our detail screen in a similar fashion to our initial browse screen here, and I’ve updated the detail screen shown here to display more relevant data.

Add / Delete Entities

Two great examples of the sort of functionality that comes with PowerApps are the add and delete buttons on our detail screen. Save and delete actually function without any editing or code required. The little trash icon on the upper right of our details page (which I’ve renamed to Accounts for the moment) represents deleting this specific record, and the small pencil icon to its right indicates an out of the box edit screen. Creating a new account is as easy as clicking the plus icon in the upper right section of the screen and entering the necessary fields. Any CRUD operations done through this screen by the user immediately updates the data source. Under the scenes, PowerApps takes the properties you’ve specified and converts that data into the native querying language your dataset uses (in this instance we’re using SForce Object Query Language, or SOQL).

PowerAppsImg7

In the next blog of this series, I’ll be exploring how to add in new data sources to our new page, how to apply navigation, filtering, sorting, as well as searching.

_________________________________________________________________________________________

To learn more about how Tallan can help you build enterprise productivity solutions to help you meet your business goals, CLICK HERE to check out our website!

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>