Pragmatic Works Nerd News

The #1 Rule for Using PowerApps with SQL Server

Written by Brad Gall | Jun 12, 2018

In today’s post I’d like to talk about PowerApps. If you’re not familiar with PowerApps, it’s a great tool to create simple apps that store data into some type of backend table, like Excel, a SharePoint list or a SQL Server table. This comes included in most, but not all, Office 365 licenses.

I suggest you check under your waffle within Office 365 to see if you have it there and if so, check out PowerApps and see where it may fit for some simple application development type tasks. Some examples of how we may use it are:

  • Have a group of people maintain a list of things stored in a table so we can then consume it later from some other data ETL applications. PowerApps will create the app for us that allows end users to interface with the table and we can pick up that data at a later point and use it for something else.
  • Simple internal applications. At Pragmatic Works we use it to do things such as track activity, so a simple app where we can just log in whenever we have specific types of activities that we want to track. We can pop up in the app, log in and it can be saved into a table for us.

Microsoft gives us recipes or templates to kick off, so you don’t have to write a lot of code with PowerApps. Even better, they have pre-canned wizards that will spit out most of what you do have to create for a PowerApp based off the metadata in a table and it can connect to an Excel table or SharePoint list, as just a couple of examples.

Since we do a lot of data work, one of the things we connect to here at PW is a SQL Server table. You can connect to a SQL Server table, it can edit that table, read from it and delete and update; basically, all our crud operations against that table.

The #1 thing I want to point out is if you’re doing some prototyping with this make sure that you have a primary key on your SQL table. If you forget to put a primary key in, the wizard will create an app for you in Read-only mode and it won’t give you an indication of why it didn’t create the edit form for you, so you’ll have to do some troubleshooting.

But if you wipe out that app, add your primary key and re-run the wizard, the PowerApp will create all the crud operations for you in the app. So, this is a really easy way to maintain a table and get some quick work done for your project.

If you’re interested in learning more about PowerApps, how you can connect to it from different sources or what you can do with it within your project, click the link below or contact us—we’d love to help.